Re: form problem



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?
.



Relevant Pages

  • Re: Ordering autoshapes
    ... the middle rectangle covers the left end of the right-most rectangle. ... shapes needs to be both on top and bottom at the same time... ... "Send backward" commands moved the object up or down the stack, ... and the bottom one _cannot_ overlap the top one. ...
    (microsoft.public.word.drawing.graphics)
  • Re: Ordering autoshapes
    ... used the Order commands ... stack, and the bottom one _cannot_ overlap the top one. ...
    (microsoft.public.word.drawing.graphics)
  • Panel Bar-Auto Hide-Getting Stuck-FC3
    ... I find that if I set the bars as auto hide, they often get stuck and ... overlap the bottom of apps, or top, where I now have 1 set to. ...
    (Fedora)
  • over lapping scroll bars
    ... The problem I have the scroll bars on the right and the ... I can do the same thing that the bottom and right side ... and overlap the right side and the bottom. ... window which will stop the side bars. ...
    (microsoft.public.windowsxp.perform_maintain)
  • over lapping scroll bars
    ... The problem I have the scroll bars on the right and the ... I can do the same thing that the bottom and riht side ... and overlap the right side and the bottom. ... window which will stop the side bars. ...
    (microsoft.public.windowsxp.perform_maintain)