[comp.windows.x] Unresizeable scrollbars under a resizeable Form widget.

ramakris@bloss.cs.vt.edu (S.Ramakrishnan) (08/17/90)

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)

ben@hpcvlx.cv.hp.com (Benjamin Ellsworth) (08/18/90)

I'm sorry that no one can/will answer your question (I certainly
can't), but I would point out your plight as one of the dangers of
using "free" software.

---

Benjamin Ellsworth    This opinion is mine, mine, MINE!!!
ben@cv.hp.com