Posted: Thu Jun 27, 2002 5:36 pm
Restored from previous forum. Originally posted by naw.
Hi,
I've got a problem with example ComboBox below - Am I doing something wrong?
If I create as an Editable Combo Box, I can retrieve items with GetGaddgetText()
that have been created using "AddGadgetItem() which is great...
But - If I overtype "HELLO WORLD" in the ComboBox, and try to retrieve it with GetGadgetText() it just returns blank.
- Tried posting this up in *Bug Reports* but no response & I'm a bit desperate to get
this fixed, so I would really appreciate any help/advice out there...
Ta - Nigel
OpenWindow(1,100,100,200,200,#PB_Window_SizeGadget,"XYZ") : CreateGadgetList(WindowID())
ComboBoxGadget(1,10,10,100,100,#PB_ComboBox_Editable)
AddGadgetItem(1,-1,"Item 1")
AddGadgetItem(1,-1,"Item 2")
AddGadgetItem(1,-1,"Item 3")
SetGadgetState(1,0)
TextGadget(3,20,70,150,30,"Type 'Hello World' above and press the 'Show' Button Below")
ButtonGadget(2,20,120,30,20,"Show")
Repeat
X=WaitWindowEvent()
Select X
Case #PB_EventGadget:
Select EventGadgetID():
Case 2: MessageRequester("X","Value in Combo Box is '"+GetGadgetText(1)+"'",0)
EndSelect
Case #PB_EventClosewindow: Quit=1
EndSelect
Until Quit=1
End
Hi,
I've got a problem with example ComboBox below - Am I doing something wrong?
If I create as an Editable Combo Box, I can retrieve items with GetGaddgetText()
that have been created using "AddGadgetItem() which is great...
But - If I overtype "HELLO WORLD" in the ComboBox, and try to retrieve it with GetGadgetText() it just returns blank.
- Tried posting this up in *Bug Reports* but no response & I'm a bit desperate to get
this fixed, so I would really appreciate any help/advice out there...
Ta - Nigel
OpenWindow(1,100,100,200,200,#PB_Window_SizeGadget,"XYZ") : CreateGadgetList(WindowID())
ComboBoxGadget(1,10,10,100,100,#PB_ComboBox_Editable)
AddGadgetItem(1,-1,"Item 1")
AddGadgetItem(1,-1,"Item 2")
AddGadgetItem(1,-1,"Item 3")
SetGadgetState(1,0)
TextGadget(3,20,70,150,30,"Type 'Hello World' above and press the 'Show' Button Below")
ButtonGadget(2,20,120,30,20,"Show")
Repeat
X=WaitWindowEvent()
Select X
Case #PB_EventGadget:
Select EventGadgetID():
Case 2: MessageRequester("X","Value in Combo Box is '"+GetGadgetText(1)+"'",0)
EndSelect
Case #PB_EventClosewindow: Quit=1
EndSelect
Until Quit=1
End