General information
Category:
Coding, syntax & commands
Title:
Textbox and Listbox nested
In order to select a full name in form I have textbox for the name and listbox in other place in form for the first name.
The listbox is only activated if more than one first name (for a name) exists like that :
texbox.ini()
local oLstBox
thisform.addobject("oLstBox","listbox")
thisform.oLstBox.tabindex = this.tabindex + 1
others properties defined here
and textbox.lostfocus()
Xnam = Enf.nam
Scan rest while Xnam = Enf.nam
thisform.oLstBox.additem(Enf.lastname)
endscan
if thisform.oLstBox.listcount > 1
thisform.oLstBox.visible = .T. && or enabled
endif
Thisform.oLstBox.clear
Thisform.oLstBox.visible = .F.
With textbox.keypress(), I can make a choice of name in all case.
All are OK, excepts that, in appropriate case, listbox appears and disappears without any possibilities to make a choice.
Where is my mistake ?
Thanks a lot.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only