Change String PlaceHolder

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
ChrisR
Addict
Addict
Posts: 1589
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Change String PlaceHolder

Post by ChrisR »

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.

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
infratec
Always Here
Always Here
Posts: 7834
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Change String PlaceHolder

Post by infratec »

+1

It is needed for programs which can change the language on the fly.
BarryG
Addict
Addict
Posts: 4340
Joined: Thu Apr 18, 2019 8:17 am

Re: Change String PlaceHolder

Post by BarryG »

+1
Post Reply