Automatic resize problem

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

Questions about motif? Contact us

6 posts / 0 new
Last post
Automatic resize problem

Submitted by Anonymous on Thu, 04/03/2003 - 06:03.

I have a parent form (called center_frm) on it 3 forms
frm1 XmNtopAttachment=XmATTACH_FORM, XmNheight=200;
frm2 XmNtopAttachment=XmATTACH_WIDGET, XmNtopWidget=frm1, XmNbottomAttachment=XmATTACH_WIDGET, XmNbottomWidget=frm3;
frm3 XmNbottomAttachment=XmATTACH_FORM, XmNheight=200;

All 3 forms have widgets (Labels, PushButtons etc).

I want frm2 automatically resize (XmNy of frm2 must become 0) when I hide frm1. I try set XmNmappedWhenManaged to False for frm1 but it only unmap frm1 and its geometry is the same. So this way not work. I try set XmNheight to 0 for frm1, but height don`t become 0 - frm1 become as smaller as all widgets on it can be visible (possible i need to set some another arguments to frm1?).
So how I can do such automatic resize? Best if this can be done with Unmapping frm1.
I don`t want use the way with setting XmNtopAttachment=XmATTACH_FORM for frm2 because I plan add some more forms between frm1 and frm2, and some of these forms can be hidden (like frm1)

Thu, 04/03/2003 - 15:44#1

Thu, 04/03/2003 - 15:44#1

Anonymous

Automatic resize problem

i want frm2 XmNy = 0 or resize automatically when frm1 is hidden,

if this is the case why cant u create frm2 inside frm1, when frm1 is unmanaged , frm2 is also unmanaged.

Fri, 04/04/2003 - 05:12#2

Fri, 04/04/2003 - 05:12#2

Anonymous

Automatic resize problem

You`ve understand me wrong - I mean that when I hide frm1, frm2 must be wider (it`s bottom edge must be attached to frm3 (as it was before) and top edge must be attached to center_frm`s top).

Fri, 04/04/2003 - 14:57#3

Fri, 04/04/2003 - 14:57#3

Anonymous

Automatic resize problem

if frm2 is sandwiched between frm3 and frm1 and if you want frm2 to be attached to parent`s(center_frm) top edge when frm1 is hidden
i suggest you to do this way.

reposition frm2 top position to zero, this will work , and by this the bottom edge of frm2 will be attached to frm3.

Mon, 04/07/2003 - 03:15#4

Mon, 04/07/2003 - 03:15#4

Anonymous

And something more automatic ???

As I said I plan there will be more forms between frm1 and frm3 so they all must automatically resize.

 

 

 

Mon, 04/07/2003 - 19:24#5

ICS_support

And something more automatic ???

I`m coming into this late.

Here are two suggestions

1) there is a FormShow widget under the MotifZone article archives. (It may not be visible at the moment.) It graphically shows widget attachments in a way that helps debug them.

2) but this is really the sort of geometry-management problem that the Tab widget is designed to handle -- displaying one of many items. Perhaps your interface can let Tab deal with the details, if you don`t really need all displayed at once.

  •