Xdialog - List Control - W=milliseconds Directive to Delay Firing Selected Event




Can be added to a List control to delay firing the selected event for a specified number of milliseconds.

The directive:


is inserted in the Listbox commands (between the % symbols).


To test the effect of this directive, create a new Xbasic script and paste this code in. Then click on a row - a message box will show the selected value. Then hold the down arrow down and the selection will move quickly down the list, but the event which shows the current selection will not fire until you have stopped holding down the down key. Then, repeat the exercise with te W=2000 directive removed. You will see that the message box is shown for every row.

dim colors as c 
colors = a5.Color_Enum()
dim selected as c 
dim dlg_title as c 
dim dlg_body as c 
dim dlg_event as c 
dlg_title = "Title"
dlg_body = <<%dlg%
dlg_event = <<%code%
if a_dlg_button = "selected_changed" then 
a_dlg_button = ""
end if 
dim flagOK as l = .f.

See Also