RowColumnWidget+ScrolledWindowWidget

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

6 posts / 0 new
Last post
RowColumnWidget+ScrolledWindowWidget

 

Hi,
i a new to motif programming and i got stuck with a strange problem
the layout looks like that

RowColumnWidget (vertical)
TextWidget
RowColumnWidget (horizontal) with bunch of buttons
ScolledWindow (Buttons and Labels)
RowColumnWidget (horizontal) with bunch of buttons

The list inside the ScolledWindow is the important part. That should grow when the window get larger.
But is stays exactly the same size as it started like the last RowColumnWidget. i tried to attach it to the buttom of the
vertical RowColumnWidget but with no success.
When i replace the vertical RowColumnWidget with a frame the window works as expected but the layout goes crasy.

idea,hints ?

 

 

Re: RowColumnWidget+ScrolledWindowWidget

 

It is unclear from your post whatyour geometry is like.
And you say the list inside the scrolled window is "the important part", but I do not see anymention of a list.

Your stated hierarchy makes no sense:

RowColumnWidget (vertical)
(no mention of any children in this rowColumn)
TextWidget
RowColumnWidget (horizontal)
button 1
button 2
... etc.
ScolledWindow (Buttons and Labels)
(??? a scrolled window has exactly one child, so it cannot have buttons and labels)
RowColumnWidget (horizontal)
button1
... etc.

How are you creating the scrolled window and its child?

Perhaps these are all children of an XmForm? If so, you should top attach it
to the widget above it, and bottom attach it to the widget below it. That will
allow it to stretch and contract as the form changes size.
--
Fred K.

 

 

 

 

Re: RowColumnWidget+ScrolledWindowWidget

 

Hi Fred,
to explain the layout a bit better:

RowColumnWidget (vertical)
TextWidget
RowColumnWidget (horizontal) with bunch of buttons
ScolledWindow (Buttons and Labels)
RowColumnWidget (horizontal) with bunch of buttons

+--------------------------------+
| TextWidget |
+--------------------------------+
| +--------------------------+ |
| | button1 | button1 | |
| +--------------------------+ |
+--------------------------------+
| |
| scrolledwindow |
| |
+--------------------------------+
| +--------------------------+ |
| | button2 | button2 | |
| +--------------------------+ |
+--------------------------------+

 

(the parser here likes to eat double spaces so the right side is distorded)

i have solved the problem by using a panedWidget. Using a RowColumnWidget caused the layout to stay in the same size
as at beginning. A larger window simply resulted in a larger arrea below the buttons2.
I tried a lot with attach to bottom etc. but with no result.

 

 

 

Re: RowColumnWidget+ScrolledWindowWidget

 

As you have discovered, the Motif RowColumn is rarely the correct manager to use to layout other widgets; it was written specifically for use with menus. An XmForm is probably what you want.

Form F:
--Text T (left attach to form, top attach to form)
--RowColumn RC (left attach to form, top attach to T)
----button1-1 in RC
----button1-2 in RC
--ScrolledWindow S (left attach to form, top attach to RC)
----Form F2 to hold children of scrolled window
--RowColumn RC2 (left attach to form, bottom attach to form)
----button2-1 in RC2
----button2-2 in RC2

Then bottom attach S to RC2.

--
Fred K

 

 

 

 

 

Re: RowColumnWidget+ScrolledWindowWidget

 

thanx i will give it a try

 

 

 

 

Re: RowColumnWidget+ScrolledWindowWidget

 

hi, i just want to report back.

i works , some sort of.
1. I had to attach to the right also.
2. the scrolledwindow keeps his beginning size, even when the main window change it size.

NTL, the other widgets behave as expected. Since the PanedWindow solves my problem i will stick there
for the time beeing.

thx a lot !