paragui-users
[Top][All Lists]
Advanced

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

Re: [paragui-users] Can't load child buttons in running time


From: Alexander Pipelka
Subject: Re: [paragui-users] Can't load child buttons in running time
Date: 24 Apr 2002 08:34:50 +0200

Am Mit, 2002-04-24 um 02.14 schrieb Alejandro Garcia:
> > > I got a PG_ThemeWidget object in my screen and would
> > > like to arrange some buttons in it but don't know how.
> > >
> > > My code compiles with no error but I get no button.
> >
> > I think you want to use PGWidgetList or PGWidgetListEx.
> > Have a look at the docs.
> 
> I've had a look at the docs and I've tried PG_WidgetList 
> but I get the same results: when I add an instance of an 
> existing widget (as a button or a slider) to another custom 
> widget it works but when I add a custom object (as simple 
> as a custom button) it doesn't.. I think that the problem 
> is that when I create an object of that kind with NULL as 
> its parent and then I change this button's parent (to make 
> it child of the main container) it doesn't get showed (but 
> it in fact is her "son" ). I've tried with AddWidget and 
> AddChild and then with Show, SetVisible, Redraw, Blit, 
> Update...

Try this procedure. It will work:

PG_ThemeWidget container(NULL, PG_Rect(...),..);
PG_CustomWidget child(&container, PG_Rect(...),..);

container.Show();

Simple as that.
That's all. This procedure is used several times in the sample app. Just
look.

Alex

PS: The rectangle of the child widget are coordinates within the parents
coordinate system.






reply via email to

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