[Gambas-user] Trapping events from dynamically created controls....
Benoit Minisini
gambas at ...1...
Tue Feb 20 20:30:12 CET 2007
On mardi 20 février 2007, sbungay wrote:
> Thank you Timothy!
>
> I was appending an index number to the end of the button name like so
>
> bh = NEW Button(LAST) AS "SkillButton" & CSTR(IndexID)
>
> My thinking was that the button names all had to be unique. Wrong wrong.
>
> Benoit, how can Gambas allow us to create controls on the fly that
> all have the same name when the IDE does not?
The IDE does. It just names that "control group".
> It gives me the results I
> want and that's great, now I'm just wondering how this works internally.
Every gambas object has an "event name" that is just used at object creation,
and that is forgotten after.
Moreover, every gambas name has a "Name" property that is initialized with the
same string used for the event name, unless the control has a control group.
In that case, the name defined in the IDE is used.
You must understand that the *.form files are transformed in Gambas source
code by the compiler. So all you see in the IDE can be done by writing code
by hand.
Regards,
--
Benoit Minisini
More information about the User
mailing list