paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-users] Button-ID within a WidgetList???


From: Himmler Andreas /OI&T
Subject: [paragui-users] Button-ID within a WidgetList???
Date: Wed, 26 Jun 2002 10:07:10 +0200

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
        




reply via email to

[Prev in Thread] Current Thread [Next in Thread]