Listbox Problem
Posted: Tue Aug 28, 2007 11:31 am
I am using a listbox to enable one of four possible locations to be selected. The current location is read from the database and the listbox selection set to match with code like the following:
This works but the problem is that if you tab into the listbox the selection changes to the first entry in the listbox. This only happens the first time you tab into it, if you tab through it a second time whatever has been selected remains unchanged. I need a fix or a workaround to prevent or circumvent this behaviour.
Thanks
xProgrammer
- Code: Select all Expand view
@3, 45 LISTBOX lbLocations VAR sThisLoc OF dlgPatFile ;
ITEMS ::aLocName SIZE 180, 110
FOR liTry = 1 TO ::nLocs
IF ::aLocKey[liTry] = ::sFLKey
lbLocations:nAt = liTry
ENDIF
NEXT
This works but the problem is that if you tab into the listbox the selection changes to the first entry in the listbox. This only happens the first time you tab into it, if you tab through it a second time whatever has been selected remains unchanged. I need a fix or a workaround to prevent or circumvent this behaviour.
Thanks
xProgrammer