Programatically pre-select text in StringGadget

Windows specific forum
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Programatically pre-select text in StringGadget

Post by IdeasVacuum »

I thought this would select the existing text in the string gadget, so I could if I wanted, simply delete it or paste over it:

Code: Select all

           SetGadgetText(#StrGdtInput,"Some Text")
            SendMessage_(GadgetID(#StrGdtInput),#EM_SETSEL,0,-1)
....however, none of the text is selected - at least, not shown (not highlighted) as selected?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4997
Joined: Sun Apr 12, 2009 6:27 am

Re: Programatically pre-select text in StringGadget

Post by RASHAD »

IdeasVacuum Hi

Code: Select all

StringGadget(#StrGdtInput,10,10,250,20,"Old Text",#ES_NOHIDESEL)
Egypt my love
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Programatically pre-select text in StringGadget

Post by IdeasVacuum »

Hi Rashad

Rashad to the rescue again! Thank you.

Confession: I think you already told me how to do this once before :oops:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply