Change String PlaceHolder
Posted: Fri Feb 20, 2026 8:55 pm
I don't know if it should be considered as a bug or a Features Requests!
With the new String flag #PB_String_PlaceHolder, SetGadgetText() change the text but does not allow to change the textual tip (PlaceHolder) and there is no function to change it without going through API.
With the new String flag #PB_String_PlaceHolder, SetGadgetText() change the text but does not allow to change the textual tip (PlaceHolder) and there is no function to change it without going through API.
Code: Select all
If OpenWindow(0, 0, 0, 260, 250, "Change_String_PlaceHolder", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
StringGadget(0, 20, 20, 220, 24, "String_PlaceHolder", #PB_String_PlaceHolder)
StringGadget(1, 20, 60, 220, 24, "String_Text")
ButtonGadget(2, 20, 100, 220, 60, "Change_String_PlaceHolder")
ButtonGadget(3, 20, 170, 220, 60, "Change_String_PlaceHolder Api")
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
Case #PB_Event_Gadget
Select EventGadget()
Case 2
SetGadgetText(0, "Change_String_PlaceHolder")
Case 3
SendMessage_(GadgetID(0), #EM_SETCUEBANNER, #True, @"Change_String_PlaceHolder Api")
EndSelect
EndSelect
ForEver
EndIf