Gadget events

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

User avatar
Danilo
Addict
Addict
Posts: 3037
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Gadget events

Post by Danilo »

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!
Little John
Addict
Addict
Posts: 4527
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Gadget events

Post by Little John »

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.
Hi Danilo,

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.
Anyway, I absolutely agree with you that this should be documented clearly and completely in the manual.
User avatar
Danilo
Addict
Addict
Posts: 3037
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Gadget events

Post by Danilo »

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.
Thanks. Okay, according to that quote ButtonGadget fires an 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'.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2071
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Gadget events

Post by Andre »

I support this request. But it must be done by Fred/freak with the needed (internal) knowledge... :)
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply