Looking forward to: grid layout

This is a discussion on Looking forward to: grid layout within the Motif forums, part of the Tools category; Hi, please have a look at this: | Name1 | dddddddjdsjfdsgdsfjjfjdfjjfksad | | SecondName | e2ewdq | Using rowcolumn and packing by column with number of columns 2 I will ...

Go Back   Unix Linux Forum > Technologies & Tools > Tools > Motif

FixUnix.com - Unix Linux Forums

Unix Content Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 04-10-2008, 05:01 AM
Default Looking forward to: grid layout

Hi,

please have a look at this:

| Name1 | dddddddjdsjfdsgdsfjjfjdfjjfksad |
| SecondName | e2ewdq |

Using rowcolumn and packing by column with number
of columns 2 I will get two columns with equal size.
But I don't need as much space for first column and
in some situation it's other way round!

How do I implement this best way?

sincerely
Thomas
Reply With Quote
  #2  
Old 04-10-2008, 10:18 AM
Default Re: Looking forward to: grid layout

On Apr 10, 2:01*am, Thomas Lehmann wrote:
> Hi,
>
> please have a look at this:
>
> | Name1 * * * * *| * dddddddjdsjfdsgdsfjjfjdfjjfksad |
> | SecondName | * * * * * * * * * * * * * * ** *e2ewdq |
>
> Using rowcolumn and packing by column with number
> of columns 2 I will get two columns with equal size.
> But I don't need as much space for first column and
> in some situation it's other way round!
>
> How do I implement this best way?
>


XmRowColumn is a poor container to use as a layout manager.
It was written specifically to handle menus, and is not very
good for anything else.

It is better to use an XmForm or XmContainer.
I wrote my own Grid widget, but writing a widget is much
more complicated than using, for example, and XmForm.
--
Fred Kleinschmidt

Reply With Quote
  #3  
Old 04-14-2008, 09:29 AM
Default Re: Looking forward to: grid layout

On Thu, 10 Apr 2008 07:18:22 -0700 (PDT),
fred.l.kleinschmidt@boeing.com wrote:

>On Apr 10, 2:01*am, Thomas Lehmann wrote:
>> Hi,
>>
>> please have a look at this:
>>
>> | Name1 * * * * *| * dddddddjdsjfdsgdsfjjfjdfjjfksad |
>> | SecondName | * * * * * * * * * * * * * * * * *e2ewdq |
>>
>> Using rowcolumn and packing by column with number
>> of columns 2 I will get two columns with equal size.
>> But I don't need as much space for first column and
>> in some situation it's other way round!
>>
>> How do I implement this best way?
>>

>
>XmRowColumn is a poor container to use as a layout manager.
>It was written specifically to handle menus, and is not very
>good for anything else.
>
>It is better to use an XmForm or XmContainer.
>I wrote my own Grid widget, but writing a widget is much
>more complicated than using, for example, and XmForm.


Have a look at http://xbae.sourceforge.net/
Reply With Quote
  #4  
Old 04-14-2008, 09:36 AM
Default Re: Looking forward to: grid layout

> It is better to use an XmForm or XmContainer.
> I wrote my own Grid widget, but writing a widget is much
> more complicated than using, for example, and XmForm.


OK, I'm not a real Motif expert! I can manage to attach each
widget as required (see little table above) but now following
problem:

I need to know >>minimum width and height<< of each widget to
ensure that the widgets are fully shown!
How can I do this?
Can I adjust widths and heights of widgets in a XmForm?

kindly
Thomas
Reply With Quote
  #5  
Old 04-14-2008, 09:40 AM
Default Re: Looking forward to: grid layout

> >more complicated than using, for example, and XmForm.
>
> Have a look athttp://xbae.sourceforge.net/


We are using the xbae but this is

1) a very buggy library!
2) a widget not behaving as the standard widgets!
3) too much to do simple things as shown above!

kindly
Thomas
Reply With Quote
  #6  
Old 04-15-2008, 05:05 AM
Default Re: Looking forward to: grid layout

On Mon, 14 Apr 2008 06:36:40 -0700 (PDT), Thomas Lehmann
wrote:

>> It is better to use an XmForm or XmContainer.
>> I wrote my own Grid widget, but writing a widget is much
>> more complicated than using, for example, and XmForm.

>
>OK, I'm not a real Motif expert! I can manage to attach each
>widget as required (see little table above) but now following
>problem:
>
> I need to know >>minimum width and height<< of each widget to
> ensure that the widgets are fully shown!
> How can I do this?


I dont think you can. The Motif form, like most of the Motif toolkit,
makes the assumption that it is much better than you at managing
geometry. If you shrink an outer widget, the form will do what it can
to maintain the constraints, even if that means distorting inner
widgets or truncating text to the point of unusability; and when it
can do no more, it gives you the dreaded "bailing out" message and
completely screws up the layout.

Motif does not have a container able to enforce 'minimum necessary
size' for all contained widgets. GTK has one, IIRC.

> Can I adjust widths and heights of widgets in a XmForm?


Indirectly. I generally use OPPOSITE_WIDGET attachments with offset 0
to align several widgets together. And I set a minimum size on the
shell, or even disable resizing completely.

Reply With Quote
  #7  
Old 04-15-2008, 05:10 AM
Default Re: Looking forward to: grid layout

On Mon, 14 Apr 2008 06:40:09 -0700 (PDT), Thomas Lehmann
wrote:

>> >more complicated than using, for example, and XmForm.

>>
>> Have a look athttp://xbae.sourceforge.net/

>
>We are using the xbae but this is
>
>1) a very buggy library!


If you dont report bugs, how can they be fixed?

>2) a widget not behaving as the standard widgets!


That's good: it allows one to do several impossible things before
breakfast!

>3) too much to do simple things as shown above!


Yes, you can implement many simple grid layouts using Form. For
anything more sophisticated, you need a grid widget. The subject of
your initial message did not specify "using Form only".

>
>kindly
>Thomas

Reply With Quote
Reply

Thread Tools


All times are GMT -5. The time now is 06:12 PM.

In an effort to better serve ads to our visitors, cookies are used on Fixunix.com. For more information, check out our Privacy Policy.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Ad Management by RedTyger