Re: [Fxruby-users] layout probs with TreeList.
Status: Inactive
Brought to you by:
lyle
From: Hugh S. S. E. E. <hg...@dm...> - 2003-07-16 16:13:49
|
On Wed, 16 Jul 2003, Lyle Johnson wrote: > Hugh Sasse Staff Elec Eng wrote: > > > Oh, so that is an inherited attribute then, as it is not listed.... > > Yes. > > > Yes, that did the job. > > Good. > > > I have since tried removing the layout hints from contents (the > > horizontal frame, and found that I get the uncorrected behaviour. > > Right. > > > I see from the FOX Docs that these FILL_ hints cause this hehaviour: > > "If more than one child with this option is placed side by side, the > > available space will be subdivided proportionally to their default > > size." > > So when I had not set the FILL_X before, I was effectively getting > > this anyway because of how LAYOUT_MIN_(WIDTH|HEIGHT) behave, and > > when I turned this off in the contents (Horiz. frame) I was getting > > this too. Only if One child and the the parent use LAYOUT_FILL will > > that child be stretched to fill the parent. Is that about right? > > Ummm, you lost me somewhere in there ;) > > When you don't specify, say, LAYOUT_FILL_X, the widget will usually just > take up as much space as it needs (a.k.a. its "default" width). I don't > think LAYOUT_FILL_* is ever a default behavior, though. I think LAYOUT_MIN_WIDTH and LAYOUT_MIN_HEIGHT are the defaults for the child widgets. So the parent would, by default, allocate according to that space. If two children in the same (X|Y) have LAYOUT_FILL_(X|Y) they conflict, so the parent must still use the defaults. If only one child has LAYOUT_FILL_(X|Y) then the parent must have it too for it to take notice. Is that right? It is the parent's need for this hint that is difficult for me: I thought it got the hints from its children... > > If so this feels rather like Tk: I remember having to use fill > > rather a lot when I used that. > > Yes, most modern GUI toolkits' layout managers owe a lot of their > heritage to Tk's Packer layout manager. I know that some of GTK's layout > managers are based on this concept, and I'm guessing that Qt's are as well. Yes, I have got this impression, too. But there is a surprising amount of criticism of Tk, particularly about it being "old fashioned", about the place. > > Hugh |