Re: Setting size of widget problem...




Brian Masney <masneyb@newwave.net> writes:

> Hello,
>    I was using gtk_widget_set_usize to set the size of some widgets, but
> the only problem I see is that it sets a minimum size restriction of the
> widget. In an app of mine, before it is closed it saves the size of some
> widgets, and next time it starts up, it'll retrieve this size, and use
> gtk_widget_set_usize to set the sizes back. So, if the user maximizes the
> program, and then closes it, next time they start it back up, it is still
> this size, and they can't shrink it. I have tried setting the values of
> the allocation fields for the widget, and doing a gtk_widget_quue_resize,
> but this don't do anything. What is the proper way for me to do this?

The best way, I think, is to retrieve the size of the
toplevel window. (Look at window->allocation). Then
use gtk_window_set_default_size() to set it back the
next time.

Regards,
                                        Owen



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