[comp.windows.x.motif] Form/scrolled window problem help request...

don@atlantis.coral.com (Don Dewar) (04/28/91)

I have an interesting problem with a XmForm in a XmScrolledWidow.  When
I set the scrollingPolicy of the XmScrolledWindow to AUTOMATIC so the
scrollbars are automatically managed by the scrolled window, the Form
inside the scrolled window is made smaller than the content of the
Form.  If I don't set the resource to AUTOMAITC, the entire contents
of the Form are shown, but of course no scroll bars will ever appear.

What I want to happen is for the Form in the XmScrolledWindow to
appear in its entirety, and have the scroll bars appear if the
scrolled window is shrunk smaller than size of the Form.  Here is a
diagram of the widget hierarchy...

+----------------------------------------------------------------+
| XmForm                        ^                                |
| +-----------------------------|------------------------------+ |
|<| XmScrolledWindow                                           | |
| | +--------------------------------------------------------+ | |
| | | Help Text Form            ^                            | | |
| | | +-------------------------|--------------------------+ | | |
| | |<| XmForm                                             | | | |
| | | | +---------+ +--------------+ +-------------------+ | | | |
| | | |<| XmLabel |<| XmPushButton |<| XmLabel           | | | | |
| | | | +----v----+ +------v-------+ +-------v-----------+ | | | |
| | | +----------------------------------------------------+ | | |
| | | +-------------------------^--------------------------+ | | |
| | |<| XmForm                                             | | | |
| | | | +------------------------------------------------+ | | | |
| | | |<| XmLabel                                        | | | | |
| | | | +----v-------------------------------------------+ | | | |
| | | +----------------------------------------------------+ | | |
| | | +-------------------------^--------------------------+ | | |
| | |<| XmForm                                             | | | |
| | | | +---------+ +------------------------------------+ | | | |
| | | |<| XmLabel |<| XmPushButton                       | | | | |
| | | | +----v----+ +------v-----------------------------+ | | | |
| | | +----------------------------------------------------+ | | |
| | +--------------------------------------------------------+ | |
| +-----------------------------v------------------------------+ |
| +------------------------------------------------------------+ |
|<| XmForm                                                     |>|
| +-----------------------------|------------------------------+ |
|                               v                                |
+----------------------------------------------------------------+


The carets, v's, lessthans, and greaterthans (^,v,<,>) denote form
attachments.  When they are on the outside to a form, they mean attach
form.  Otherwise, they mean attach to the widget I am pointing to.

I am sure I could write code to fix this, but I assumed under these
conditions what I want to happen should happen.  Can somebody explain
what is wrong with this picture?

  +---------+
  | Coral   |
  |@@@@@*@**|
  |@@*@@**@@|     Don Dewar
  |*@@**@@@@|     Coral Network Corporation, Marlborough, MA
  |@***@@@@@|     Internet: don@coral.com
  |@@**@@@@@|     Phone:    (508) 460-6010
  |*********|     Fax:      (508) 481-6258
  |Networks |
  +---------+