EditorGadget()+#PB_EventType_Change

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

EditorGadget()+#PB_EventType_Change

Post 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.
Last edited by WilliamL on Mon Mar 16, 2009 3:37 am, edited 1 time in total.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

maybe
If EventID= #WM_KEYDOWN And GadgetID =

cheers
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Post by WilliamL »

not on a Mac :(
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

rsts wrote:maybe
If EventID= #WM_KEYDOWN And GadgetID =

cheers
Is not the same as #PB_EventType_Change :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Post 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.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

> Did I miss something?
no, i have only corrected rsts, a change comes not only from keyboard!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post 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
User avatar
hallodri
Enthusiast
Enthusiast
Posts: 208
Joined: Tue Nov 08, 2005 7:59 am
Location: Germany
Contact:

Post 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)
;)
Post Reply