Results 1 to 7 of 7

Thread: What event should I used to fire off a changed row in custom listbox?

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Posts
    1,214

    What event should I used to fire off a changed row in custom listbox?

    Hi,

    In a custom vfp section with a listbox, I am trying to call an event when the user uses the arrow key to navigate in the listbox.

    I have tried to keypress and valid, but no luck.

    Which event should I be using?

    Thanks

    Herb

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,949
    Hi Herb,

    it looks like the bindevent method on .activerow should do the trick: https://www.lianja.com/doc/index.php/Bindevent_Method.

    In VFP the valid event would fire (although that has its own problems in VFP because SETFOCUS can't be called from the VALID).

    Anyway, I hope bindevent works for you.

    Hank

  3. #3
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,380
    Hi Herb,

    interactivechange() is called when you cursor in a listbox.

    Regards,

    Yvonne

  4. #4
    Senior Member
    Join Date
    Feb 2012
    Posts
    1,214
    Thanks Hank, Yvonne,

    Interactivechange did the trick.

    Herb

  5. #5
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,949
    Hi Yvonne,

    I looked yesterday at the Listbox Events, where InteractiveChange is not listed, and then at Common Events, where it also is not listed.

    Where should I have looked?

    thanks,

    Hank

  6. #6
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,380
    Hi Hank,

    The class events documentation could still do with some work The canvas listbox advanced control has interactivechange(), so I just tested it on a framework listbox and saw it worked there too.

    Regards,

    Yvonne

  7. #7
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,949
    Hi Yvonne,

    thanks. I thought that might be the case, and also thought I might have missed things. The latter I gave the highest probability.

    Now if amembers() worked for UI Framework Classes, and handled methods and events as the VFP version did (I'm going on the documentation for this remark), we could easily determine this.

    thanks,

    Hank

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us