| Unix Content | Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| 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 |
|
#2
|
| On Apr 10, 2:01*am, Thomas Lehmann > 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 |
|
#3
|
| On Thu, 10 Apr 2008 07:18:22 -0700 (PDT), fred.l.kleinschmidt@boeing.com wrote: >On Apr 10, 2:01*am, Thomas Lehmann >> 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/ |
|
#4
|
| > 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 |
|
#5
|
| > >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 |
|
#6
|
| On Mon, 14 Apr 2008 06:36:40 -0700 (PDT), Thomas Lehmann >> 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. |
|
#7
|
| On Mon, 14 Apr 2008 06:40:09 -0700 (PDT), Thomas Lehmann >> >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 |