Restored from previous forum. Originally posted by TeddyLM.
How can I highlight whatever is in a TextGadget or a StringGadget when it gains focus.
I did it before using the Visual Basic functions SelStart and SelLength. But I didn't find such commands in PB !!
Some help would be nice.
Thanks
TeddyLM
A new registered PB-User
(... a long long way from home)
Highlight Text
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Pupil.
Test this on your stringgadget, havent testes on text gadget.
Test this on your stringgadget, havent testes on text gadget.
Code: Select all
; this is in you event loop
...
case #YourStringGadget
if EventType() = #PB_EventType_Focus
SendMessage_(GadgetID(#YourStringGadget), #EM_SETSEL, 0, -1)
endif
...
endselect
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm