RE: [gtk-list] window sizing with gtk_window_set_usize?




On 23-Apr-98 Des Herriott wrote:
> Which doesn't do quite what I'd like.  Although the initial size is
> correct, and the window can be resized, if I shrink it
> horizontally, it
> immediately snaps back to the width as set by set_usize().  The
> main
> child widget is a HPaned which contains to CList widgets.
> 
> Is there a way of avoiding this?  I guess what I'd like is to
> specify a
> minimum width & height, and let the user resize the window to any
> width
> & height greater than this minimum, but I haven't been able to find
> a
> way of doing this.

Here's a trick which Elrond on IRC gave me. You shouldn't need to
change the policy with this.
 
static gint reset_usize(gpointer data)
{
  gtk_widget_set_usize(GTK_WIDGET(data), 0, 0);
  return FALSE;
}
      
gtk_widget_set_usize(GTK_WIDGET(window),
                        640,  400);
gtk_idle_add(reset_usize, window);


--
E-Mail: Tony Gale <gale@daedalus.dera.gov.uk>
Cold hands, no gloves.

The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.



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