Select all text in a StringGadget

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Select all text in a StringGadget

Post by PB »

Sometimes I like to select all text in a StringGadget to save the user from
having to do it. At the moment I'm using this procedure, but a native
command would be nice (to save the extra typing):

Code: Select all

Procedure SelectAll(gad)
  SendMessage_(GadgetID(gad),#EM_SETSEL,0,99999)
  ActivateGadget(gad)
EndProcedure