Page 1 of 1

Posted: Thu Oct 24, 2002 4:30 pm
by BackupUser
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)

Posted: Thu Oct 24, 2002 5:12 pm
by BackupUser
Restored from previous forum. Originally posted by Pupil.

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

Posted: Thu Oct 24, 2002 10:23 pm
by BackupUser
Restored from previous forum. Originally posted by TeddyLM.

Great !
That's what I was looking for !!

Thanks Pupil

I owe you one !


New registered PB-Apprentice

(... a long long way from home)