Vista Textbox/gadget cue banner.
Posted: Tue Sep 02, 2008 3:50 pm
ComboBox and StringGadget initial "Choose" text.
Compile as unicode unless you ant to mess around with PeekS and PokeS to convert the text for SendMessage.
Compile as unicode unless you ant to mess around with PeekS and PokeS to convert the text for SendMessage.
Code: Select all
#ECM_FIRST=$1500
#EM_SETCUEBANNER=#ECM_FIRST+1
#CB_SETCUEBANNER=$1703
If OpenWindow(0, 0, 0, 270, 140, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
ComboBoxGadget(0, 10, 10, 250, 100, #PB_ComboBox_Editable)
AddGadgetItem(0, -1, "ComboBox editable...")
SendMessage_(GadgetID(0), #CB_SETCUEBANNER, 0, "Choose or enter:");
ComboBoxGadget(1, 10, 40, 250, 100)
For a = 1 To 5 : AddGadgetItem(1, -1,"ComboBox item " + Str(a)) : Next a
; SetGadgetState(1, 2) ; set (beginning with 0) the third item as active one
SendMessage_(GadgetID(1), #CB_SETCUEBANNER, 0, "Select an option:");
StringGadget(2, 10, 70, 250, 20,"")
SendMessage_(GadgetID(2), #EM_SETCUEBANNER, 0, "Enter text:");
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf