Re: Widgets without packers, is there a way?




JB <jimbag@kw.igs.net> writes:

> I have been trying to place widgets in a scrolled window utilizing a
> coordinate system rather than allowing the packer to do it's thing. I would
> like to be able to add a widget something like:
> 
> gtk_????_add( ThisWidget, somewidget, 10, 10, 20, 100 );
> 
> I've toyed with writing an xybox widget, fiddled with intercepting draw, but
> the task seems monumental and leads me to think (hope), there is an easier
> way. Basically, I'm hoping someone can offer some advice on how to do this,
> and if need be, some advice on where to hook a derived widget of my own making
> into the heirarchy. Any thoughts, advice, or otherwise welcome.

Take a look at the GtkFixed widget. I think it is almost exactly
what you want.

 gtk_fixed_put (GTK_FIXED (fixed), somewidget, 10, 10);
 gtk_widget_set_usize (somewidget, 20, 100);

(Or let somewidget pick its own size)

Regards,
                                        Owen



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