Unmap widgets from a RowColumn - Motif
This is a discussion on Unmap widgets from a RowColumn - Motif ; I have an application which I configure differently for different
uses. In general this means that I have a "full" application where
I unmap certain widgets/functions based on user profiles, etc.
using resource files (*.somePB.mappedWhenManaged: false).
However, I have now ...
-
Unmap widgets from a RowColumn
I have an application which I configure differently for different
uses. In general this means that I have a "full" application where
I unmap certain widgets/functions based on user profiles, etc.
using resource files (*.somePB.mappedWhenManaged: false).
However, I have now run into a problem with pushButtons (and
probably other widgets for that matter) in rowColumwns (which are
pull-down menus). If I try to remove remove as per above, the
widget is actually removed, but the rowColumn "indicates" the
"missing" widget by having the original (i.e. full, before removal
of the widget) size. In other words, I get a 10 widget long
pull-down menu with only 9 visible widgets).
If I use XtUnmanageChild to programatically remove the widget,
it behaves as expected. However, I had hoped that I could
continue to use resource files. Is there a trick?
Regards,
-Frode
--
^ Frode Tennebø | email: Frode.Tennebo@ericsson.com ^
| Ericsson AS., N-1788 Halden | Phone: +47 67 25 09 39 |
| with Standard.Disclaimer; use Standard.Disclaimer; |
-
Re: Unmap widgets from a RowColumn
It's best controlled when you create the widget (XtCreate vs
XtCreateManaged), which typically isn't the purview of resource files.
That's better than creating it and then unmanaging it as it avoids a
redundant geometry computation.
If you use the Wcl library, then you get a .wcManaged resource which
controls this -- but only because it encodes widget creation into
specialized resources. You could use it, but you'd have to rewrite your
widget creation into those special resources in order for it to be heeded.
-
Re: Unmap widgets from a RowColumn
"Frode Tenneboe" wrote in message
news:1139325706.66725@edh3...
>I have an application which I configure differently for different
> uses. In general this means that I have a "full" application where
> I unmap certain widgets/functions based on user profiles, etc.
> using resource files (*.somePB.mappedWhenManaged: false).
>
> However, I have now run into a problem with pushButtons (and
> probably other widgets for that matter) in rowColumwns (which are
> pull-down menus). If I try to remove remove as per above, the
> widget is actually removed, but the rowColumn "indicates" the
> "missing" widget by having the original (i.e. full, before removal
> of the widget) size. In other words, I get a 10 widget long
> pull-down menu with only 9 visible widgets).
>
> If I use XtUnmanageChild to programatically remove the widget,
> it behaves as expected. However, I had hoped that I could
> continue to use resource files. Is there a trick?
>
> Regards,
> -Frode
>
> --
> ^ Frode Tennebø | email: Frode.Tennebo@ericsson.com ^
> | Ericsson AS., N-1788 Halden | Phone: +47 67 25 09 39 |
> | with Standard.Disclaimer; use Standard.Disclaimer; |
Create the widget as unmanaged, then check its XmNmappedWhenManaged
resource.
If it is True, manage the widget. If False, change it to True but do not
manage it.
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Software Reuse Project
-
Re: Unmap widgets from a RowColumn
Fred Kleinschmidt wrote:
> Create the widget as unmanaged, then check its XmNmappedWhenManaged
> resource.
> If it is True, manage the widget. If False, change it to True but do not
> manage it.
Very slick, overloading an existing resource.