There is any way to get EventType for a Editor Gadget?
I need those ones:
#PB_EventType_LeftClick : Left mouse button click
#PB_EventType_Focus : Get the focus.
#PB_EventType_LostFocus : Lose the focus.
Any idea?
EventType for EditorGadget
-
- User
- Posts: 81
- Joined: Thu Sep 23, 2010 4:22 am
EventType for EditorGadget
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
Re: EventType for EditorGadget
I would like to second Vitor_Boss' request. I need this ability too.
I would like to just get a normal 'EventGadget()' response as writen in manual but Viror_Boss's request would be better.
I would like to just get a normal 'EventGadget()' response as writen in manual but Viror_Boss's request would be better.

#Gadget will be the number returned by the EventGadget() function.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
Re: EventType for EditorGadget
Did you try a search in this forum?Vitor_Boss® wrote:There is any way to get EventType for a Editor Gadget?

Because there exist numerous code examples for detecting actions elicited by
the EditorGadget in Windows. See this posting from srod where he demonstrates
how to even enable #PB_EventType_Change in the EditorGadget of Windows:
http://www.purebasic.fr/english/viewtop ... 62&start=1
In this posting he also explains:
This is a small collection of further code examples for detecting events in the EditorGadgetsrod wrote:The default for Windows rich edit controls (editor gadgets) is NOT to send notification of such 'change' events to the parent window.
in Windows:
- Detect mouse up and down of left and right button (Sparkie):
viewtopic.php?t=18667&start=3
- Detect left mouse click and moving the cursor above the EditorGadget (netmaestro)
http://www.purebasic.fr/english/viewtop ... 46&start=1
- Detect content change and count changes (Fluid Byte with addition by Rings):
http://www.purebasic.fr/german/viewtopi ... 5&start=15
- Detect click on WebLink (freak):
http://www.purebasic.fr/english/viewtop ... 35&start=5
- Detect left click and display x and y coordinates (Sparkie):
http://purebasic.fr/english/viewtopic.p ... 57&start=9
- Detect right click and display context menu (ts-soft):
http://www.purebasic.fr/german/viewtopi ... 43&start=4
Mac users may modify this example of Niffo.
They only have to exchange the definition of the ContainerGadget against a
definition of an EditorGadget and then are able to detect mouse up and down
events and detecting the mouse cursor above the EditorGadget.
Of course crossplatform EventTypes for the EditorGadget would be the best
solution...

-
- User
- Posts: 81
- Joined: Thu Sep 23, 2010 4:22 am
Re: EventType for EditorGadget
Thank you very much.
I tried use the forum search but not found the posts.
I tried use the forum search but not found the posts.
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
Re: EventType for EditorGadget
#PB_EventType_Change works great (in 5.10b2x64) but I'd still like the above...#PB_EventType_Focus : Get the focus.
#PB_EventType_LostFocus : Lose the focus.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
Re: EventType for EditorGadget
Hi,
in Windows PB 5.11 there are additional undocumented EventTypes() for the EditorGadget()
1024 -> at program start
256 -> focus (or something similar)
512 -> lost focus (or something similar)
Bernd
in Windows PB 5.11 there are additional undocumented EventTypes() for the EditorGadget()
1024 -> at program start
256 -> focus (or something similar)
512 -> lost focus (or something similar)
Bernd