Re: treeview/scrolled box resizing



Murray Cumming wrote:
>MK wrote:
> >  It's kind of beyond stupid that anyone would think this
> > would count as "functional" under any circumstances...much less
> > make it incredibly awkward to impliment anything else?????????
> 
> This does not make me want to help you.

I apologize for being hyperbolic, I can see now this looks
petulant.  I do think there is a sort of design oversight here, but
sorry again for putting it like that.

> > GtkAttachOptions to GTK_SHRINK. Cannot I not do this in gtkmm,
> > and/or with boxes?
> 
> Yes, you can:
> http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-multi-item-containers.html.en#sec-table
> http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-multi-item-containers.html.en#sec-boxes

Okay, I have already been doing this, packing options alone are not
enough. My diagnosis of the issue was a little bit off, in fact what
prevented the expansion in my previous code was setting widget sizes
before they are realized, and then leaving them to expand *if* the
window is made larger manually.  Part of the "oversight" in my mind is
that the window cannot then be resized smaller, meaning the only way to
prevent this infinite expansion is to set an arbitrary size *before
realization.*

So I'm looking for insight or suggestions.  What I'd like to do is
allow the window to realize itself, check the size against the
DisplayWidth/DisplayHeight from Xlib, and then shrink the window down
if it exceeds the margins using signal_configure_event().  AFAICT,
however, that is not possible with gtk -- once the widgets have been
realized unconstrained, subsequent resize requests to become smaller are
ignored. I have done a little bit of lower level Xlib programming and I
am sure this is not a window manager issue, it is an internal policy of
gtk.   

What it means is that I will have to set an initial minimal size,
allowing the window to be enlarged by the user.  It is also unfortunate
that a gtk set size request requires a commitment in both dimensions
(again, this is not a limitation imposed by X), since in this case the
issue is only a height issue.

I'm curious to hear how other people have dealt with this. 

-- 
MK <halfcountplus intergate com>


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