Re: form problem
- From: Chris Sorenson <csoren@xxxxxxx>
- Date: Sat, 05 May 2007 23:45:33 -0500
Peter A. Buhr wrote:
In article <JHC1wF.FFI@xxxxxxxxxxxxxxx>,
Fred Kleinschmidt <fred.l.kleinmschmidt@xxxxxxxxxx> wrote:
The titles are children of the form. They are always inside the form. I don't
understand what you mean by saying the form overlaps the titles.
Sorry, my explanation was ambiguous. What I meant is that as the form size is
reduced using the sash for the pane that contains it, the form eventually
shrinks the scroller widget to zero and then begins to overlap the top and
bottom titles so the text of the two titles is on top of one another making it
impossible to read. (Yes, it really, really does this.)
It does; I compiled it and you're right.
The scrolled text is the stretchable item - that is , it is both top- and
bottom -attached. When you shrink the form so small that all of its children
cannot be displayed, bad things start to happen. ... If there is not enough
room for both to fit, they will overlap. It is arbitrary which one will be
visible.
As mentioned above, it is not arbitrary which one is visible; they are BOTH
visible because the text widgets overlap.
XmForm inherits XmNallowOverlap from XmBulletinBoard, by default it's
True, so you might want to try setting it to False and see if that
does what you want...
I now see why this happens because
there is no connection between the top and bottom title once the scroller
height shrinks to zero so the form pushes the bottom title widget over the top
title widget. Below is a modification to my initial example program that
attempts to solve this problem. I attached a resize callback to the form. In
the callback, the size of the form is checked to effectively see if the
scroller has shrunk to zero (by checking the title heights). At that point, I
unmanaged the scroller and disconnect it from the form, and directly connect
the top and bottom titles. This approach seems to produce the desired effect
of leaving only the top title visible as the form size is reduced to the
minimum and produces a smooth transition of dissolving the bottom title after
the scroller has disappeared. Any comments on the "goodness" of this approach
or alternate approaches are welcome.
I compiled it and you're right it stops the overlap, it looks like a
good fix...
Finally, no one answered this question, and I am still very interested in the
answer.
I have one other question. Why is it necessary to set the minimum pane size
for the form widget *AFTER* realization? If I set the minimum pane size at
any other point, the form widget is always the minimum pane size. Again, my
mental-model of how motif works does not explain this behaviour.
XtVaSetValues( form, XmNpaneMinimum, topHeight, NULL );
I'm a bit mystified about this as XmNpaneMinimum is not an XmForm
resource. However it does compile and run without complaint. What
version of Motif are you using?
.
- Follow-Ups:
- Re: form problem
- From: Peter A. Buhr
- Re: form problem
- References:
- Re: form problem
- From: Fred Kleinschmidt
- Re: form problem
- From: Peter A. Buhr
- Re: form problem
- Prev by Date: Re: form problem
- Next by Date: Re: form problem
- Previous by thread: Re: form problem
- Next by thread: Re: form problem
- Index(es):
Relevant Pages
|