chapman@lll-lcc.UUCP (Carol Chapman) (04/10/89)
I've noticed a strange thing when I try to place a viewport widget within a form widget. I think there must be a simple solution that I just don't know about. In my code, I state the exact size I would like the viewport widget to be, and where the viewport widget should be placed relative to a scrollbar widget which is also within the same form widget. To do this I use XtNheight, XtNwidth, XtNfromHoriz and XtNhorizDistance. Well, the viewport widget gets drawn starting in the proper place, but it extends clear to the right edge of the form widget, rather than limiting itself to the width I stated in XtNwidth. So far, my only way around this has been to change the starting location of the viewport, moving it further toward the right edge of the form so that it will be the width I want. All right experts, what's the real solution?? carol -- ------------------------------------------------------------------------------- Livermore Lab (chapman@lll-crg.llnl.gov or chapman@lll-lcc.llnl.gov) P.O. Box 808, L-153 Tel. (415) 423-7876 Livermore, CA 94550 "Never own anything that you have to FEED or PAINT."
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (04/19/89)
> In my code, I state the exact size I would like the viewport widget to > be, and where the viewport widget should be placed relative to a > scrollbar widget which is also within the same form widget. To do > this I use XtNheight, XtNwidth, XtNfromHoriz and XtNhorizDistance. > Well, the viewport widget gets drawn starting in the proper place, but > it extends clear to the right edge of the form widget, rather than > limiting itself to the width I stated in XtNwidth. > All right experts, what's the real solution?? Try setting the left and right edges of the Viewport to XtChainLeft and the top and bottom edges to XtChainTop. This should keep it from resizing. Chris D. Peterson MIT X Consortium