Finding Selectionstart/selectionend in string/editorgadget
Posted: Wed Dec 04, 2024 1:17 am
I'm trying to find is if there is a way to get the selectionstart and selectionend when you mark some text in and string/editorgadget,
I know how to set the selectionstart and selectionend. Googling usually gives you like;
start = gagdet.Selectionstart
TheEnd = gagdet.SelectionEnd
Something asfar as I know PB does not support. So is there a way to get these two values?
So far I've tested with this;
and other combos of wp and lp.
but whatever wp/lp returns is what I put into it, not the first and last position as expected of market text
I know how to set the selectionstart and selectionend. Googling usually gives you like;
start = gagdet.Selectionstart
TheEnd = gagdet.SelectionEnd
Something asfar as I know PB does not support. So is there a way to get these two values?
So far I've tested with this;
Code: Select all
Protected.i wp = 0, lp = -1
SendMessage_(GadgetID(#TxtMinutesInHour),#EM_GETSEL,wp,lp)
but whatever wp/lp returns is what I put into it, not the first and last position as expected of market text