Hidden details... - Motif

This is a discussion on Hidden details... - Motif ; Hi, Could someone please explain how to implement this: - I have a push button and a form with some content. - The form is created but not shown - initially. - When pressing the button the form should be ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Hidden details...

  1. Hidden details...

    Hi,

    Could someone please explain how to implement this:

    - I have a push button and a form with some content.
    - The form is created but not shown - initially.
    - When pressing the button the form should be shown below
    the button. Next time the form will be hidden. a.s.o.

    The XmNallowShellResize of the dialog is set to true.

    Do I have to relayout?
    Actually I have done the layout when creating the widgets!

    kindly
    Thomas

  2. Re: Hidden details...

    On Nov 4, 11:36*pm, Thomas Lehmann wrote:
    > Hi,
    >
    > Could someone please explain how to implement this:
    >
    > - I have a push button and a form with some content.
    > - The form is created but not shown - initially.
    > - When pressing the button the form should be shown below
    > * the button. Next time the form will be hidden. a.s.o.
    >
    > The XmNallowShellResize of the dialog is set to true.
    >
    > Do I have to relayout?
    > Actually I have done the layout when creating the widgets!
    >


    You need an additional manager (maybe a another Form):
    toplevelshell
    mainform
    button
    form2 with other content (top attached to button)

    Initially, the mainform and button are managed, form2 is unmanaged
    Register an XmNactivateCallback on the button.
    In the callback, keep track of whether corm2 is managed or unmanaged
    and unmanage or manage it.

    Maybe a better way is to use a toggle button instead of a pushbutton.
    --
    Fred Kleinschmidt

+ Reply to Thread