[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: [paragui-users] Button-ID within a WidgetList???
From: |
Himmler Andreas /OI&T |
Subject: |
AW: [paragui-users] Button-ID within a WidgetList??? |
Date: |
Wed, 26 Jun 2002 11:14:28 +0200 |
Hi!
My problem is : I plan to include over 20 buttons in one WidgetList and if I
have to use SetEventCallback I have to write a function for each button, or
is there another way?
The things to do if a button is clicked are nearly the same for each one -
so one big function would have been better for my reasons... Is there a way
to send the CALLBACK-function the button-id or to check it out or something
like that???
Bye,
Himmler Andreas
-----Ursprüngliche Nachricht-----
Von: Alexander Pipelka [mailto:address@hidden
Gesendet: Mittwoch, 26. Juni 2002 10:23
An: paragui-users
Betreff: Re: [paragui-users] Button-ID within a WidgetList???
These events are only passed one level up (from child to parent).
In this case your buttons are children from the widgetlist which is a
child of myWidget (2 levels).
Please use SetEventCallback/SetEventObject (MSG_BUTTONCLICK) to connect
your buttons.
Alex
Am Mit, 2002-06-26 um 10.07 schrieb Himmler Andreas /OI&T:
> Hi!
>
> I made a new ThemeWidget-class which has an WidgetList in it an a few
> buttons are in this WidgetList. How can I see, if one of these buttons is
> pressed and test which one?
>
> Do I have to make a new WidgetList-class which it's own
> eventButtonClick-function??? If yes, which things should I care of?
>
> Now, my code looks like:
>
> ....
> myWidget::myWidget(PG_Widget* parent, PG_Rect r) :
> PG_ThemeWidget(parent, r, true)
> {
> ....
> PG_WidgetList* WL1;
> PG_Button* Test1;
> PG_Button* Test2;
>
> Test1=new PG_Button(NULL,10,PG_Rect(...),"test1");
> Test2=new PG_Button(NULL,11,PG_Rect(...),"test2");
>
>
> WL1->AddWidget(Test1);
> WL1->AddWidget(Test2);
> };
>
> myWidget::eventButtonClick(int id, PG_Widget* widget)
> {
> // here the prog never comes, if one of the buttons in the
> widgetlist is pressed....
> };
> ....
>
> Tanks for all hints and tipps!
>
> Bye,
>
>
> Himmler Andreas
>
>
>
> _______________________________________________
> paragui-users mailing list
> address@hidden
> http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users
>
_______________________________________________
paragui-users mailing list
address@hidden
http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users
- AW: [paragui-users] Button-ID within a WidgetList???,
Himmler Andreas /OI&T <=