Page 1 of 1

Programatically pre-select text in StringGadget

Posted: Sat Feb 04, 2012 6:01 am
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?

Re: Programatically pre-select text in StringGadget

Posted: Sat Feb 04, 2012 7:49 am
by RASHAD
IdeasVacuum Hi

Code: Select all

StringGadget(#StrGdtInput,10,10,250,20,"Old Text",#ES_NOHIDESEL)

Re: Programatically pre-select text in StringGadget

Posted: Sat Feb 04, 2012 9:29 pm
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: