Hi Jeff,

 

I think you're asking for a way to know using an event, as to when a listbox
selected item is changed (do I have that right)?  If so, and if this is your
own xml dialog (and not a dialog belonging to  some other program, then you
can use a predefined xml event type for listbox selection changes in the
dialog event handler, like so below:

 

Function myDialogEvent(dlg, dlgEvent, id, ctrl)

 

Select case id

Case id = "myListBox"

' this is my listbox control

If dlgEvent = listboxSelectionChange Then

' and now I see the selected item of the listbox has just changed

 

 

If you are trying to find out when a listbox changes, and the listbox is not
in an xml dialog of yours, but in some program you're writing an app for;
then you can use an MSAA event to notify you when the listbox selection
changes (assuming this program is generating MSAA events, not always
guaranteed).  Let me know if you need an MSAA example and I'll put one
together for you.

 

Hth,

 

Chip

 

From: Jeff Weiss [mailto:jeff-we...@sbcglobal.net] 
Sent: Saturday, January 11, 2014 9:01 PM
To: gw-scripting@gwmicro.com
Subject: listbox change

 

How can you find out when a focused listitem changes in a dialog?

I am trying to use select case and it works fine when a button is pressed,
but I want to find out when the user presses the up or down arrow in the
list itself.

thanks

Jeff Weiss

 

Reply via email to