Page 1 of 1
EditorGadget()+#PB_EventType_Change
Posted: Mon Mar 16, 2009 12:12 am
by WilliamL
How about adding the ability to get an event if there has been a keystroke in the EditorGadget()? Something like #PB_EventType_Change that is used in the StringGadget(). If I knew that I could make a word-wrap procedure.
Posted: Mon Mar 16, 2009 1:31 am
by rsts
maybe
If EventID= #WM_KEYDOWN And GadgetID =
cheers
Posted: Mon Mar 16, 2009 3:01 am
by WilliamL
not on a Mac

Posted: Mon Mar 16, 2009 3:18 am
by ts-soft
rsts wrote:maybe
If EventID= #WM_KEYDOWN And GadgetID =
cheers
Is not the same as #PB_EventType_Change

Posted: Mon Mar 16, 2009 3:24 am
by WilliamL
Did I miss something? The manual does not say that #PB_EventType_Change works with the EditorGadget(). And I tried it and it didn't give me an event.
Posted: Mon Mar 16, 2009 3:58 am
by ts-soft
> Did I miss something?
no, i have only corrected rsts, a change comes not only from keyboard!
Posted: Mon Mar 16, 2009 4:53 am
by rsts
ts-soft wrote:> Did I miss something?
no, i have only corrected rsts, a change comes not only from keyboard!
I know that - he asked for "something like" in order to know when a change occured in an editorgadget. I believe my way will work under windows (but not a mac). No it's not the same, but it might help out in until it can be implemented.
cheers
Posted: Mon Mar 16, 2009 9:45 pm
by hallodri
rsts wrote:maybe
If EventID= #WM_KEYDOWN And GadgetID =
cheers
On windows try this :
Code: Select all
emask = #ENM_CHANGE
emask | SendMessage_(editor,#EM_GETEVENTMASK,0,0)
SendMessage_(editor,#EM_SETEVENTMASK,0,emask)
