Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!vtserf!creatures!bloss.cs.vt.edu!ramakris From: ramakris@bloss.cs.vt.edu (S.Ramakrishnan) Newsgroups: comp.windows.x Subject: Unresizeable scrollbars under a resizeable Form widget. Keywords: Fixed width Scrollbars, Resizeable Form, Kellog's Oat Bran Pretzels. Message-ID: <550@creatures.cs.vt.edu> Date: 17 Aug 90 02:39:15 GMT Sender: usenet@creatures.cs.vt.edu Reply-To: ramakris@bloss.cs.vt.edu (S.Ramakrishnan) Distribution: na Organization: Virginia Tech Computer Science, Blacksburg, VA Lines: 87 I POSTED THIS LAST WEEK. I DIDNT HEAR FROM ANYONE. I AM REPOSTING IT IN THE HOPE THAT SOME KIND SOUL MAY NOTICE IT. PLEASE HELP ! Trouble in keeping scrollbars from getting resized. -------------------------------------------------- I need help in creating a config in which resizing the toplevel window will leave the scrollbar children undisturbed breadthwise. Setup is ... ------------ canvas_shell (topLevelShellWidgetClass) | | form widget | | | / | \ box horiz vertical widget scroll scrollbar widget * The scrollbars are : 1) chained to the form boundary (Horiz chained with XtNchainBottom and vert scrollbar with XtNchainLeft to the form). 2) are created with Resizeable == False, i.e. not to be resized when form is resized. * The vertical scrollbar is separated by the fromVert attribute from the box widget. The vertDistance is 1. * The horizontal scrollbar is separated by the fromHoriz attribute from the box. The horizDistance is 1. * The horiz scrollbar is separated from the vertical scrollbar by the fromVert attribute. vertDistance value is 1. Whenever the form is resized, I do the following : * Inhibit form relayout (XtFormDoLayout(form, False)). * The box is resized . * The horiz scrollbar is made to assume the new width of the box. * And the vert scrollbar the new ht of the box. * The thicknesses of the scrollbars are forcibly set to a constant at every resize. * Allow form layout (XtFormDoLayout(form, True)). * Do a XtResizeWindow(form) after all this. Results : -------- Whenever the toplevel window is resized, the three children get resized proportionately. The scrollbars become "fat" (how I hate fat scrollbars !) when the form is enlarged and they become thin as Kellog's Oat Bran Pretzels when the form is contracted (how I hate scrollbars as thin as Kellog's Oat Bran Pretzels !). Question : -------- * CAN SOMEONE HELP ? * How else may I achieve the results I desire ? (Please email the response to ramakris@bloss.cs.vt.edu instead of posting it). -- -- S.Ramakrishnan, CS Dept, McBryde Hall, VaTech, Blacksburg, Virg. 24061-0106 (email : ramakris@bloss.cs.vt.edu, ramakris@vtcc1.cc.vt.edu)