Would be nice if all gadgets get a small comment/section about supported events,
and a small note if it does not support any events.
For example, help for SplitterGadget and ButtonGadget do not say anything about
any events at all.
It's guesswork: Does the SplitterGadget support any event on all systems, or does
it work by accident on my system? According to the documentation it has no events.
I expect the SplitterGadget to fire #PB_EventType_Change if the user changes the splitter.
It fires an event #PB_Event_Gadget, and EventType() is always 0.
0 is #PB_EventType_LeftClick on my system.
A bit confusing, and I think proper documentation could (and should) help here.
Thanks!
Gadget events
Moderator: Documentation Editors
-
- Addict
- Posts: 4527
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Gadget events
Hi Danilo,Danilo wrote:For example, help for SplitterGadget and ButtonGadget do not say anything about
any events at all.
It's guesswork: Does the SplitterGadget support any event on all systems, or does
it work by accident on my system? According to the documentation it has no events.
I think this is the explanation:
Anyway, I absolutely agree with you that this should be documented clearly and completely in the manual.[u]freak[/u] wrote:Gadgets that only have a single type of event return 0 from EventType() and are not mentioned on the EventType() page. Just like the ButtonGadget() which has only the "pressed" event.
Re: Gadget events
Thanks. Okay, according to that quote ButtonGadget fires an event.Little John wrote:I think this is the explanation:
[u]freak[/u] wrote:Gadgets that only have a single type of event return 0 from EventType() and are not mentioned on the EventType() page. Just like the ButtonGadget() which has only the "pressed" event.
But what about the following?
- TextGadget
- SplitterGadget
- IPAddressGadget
- TrackbarGadget
- OptionGadget
- HyperlinkGadget
- ShortcutGadget
- ScrollAreaGadget
Does the ScrollAreaGadget fire an event when scrolled, or not?
To be honest, I don't know. Need to test it on all systems to make sure
I can really use it for cross-platform PB apps. It's not documented, so
it's not supported.
If it's documented it is clear. I would even recommend to create a new section 'Events'
for all gadgets. Sections like 'Remarks', 'Example', 'Return Value' ... and 'Supported Events'.
- Andre
- PureBasic Team
- Posts: 2071
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: Gadget events
I support this request. But it must be done by Fred/freak with the needed (internal) knowledge...