Adding widgets to XmFileSelectionBox - Motif

This is a discussion on Adding widgets to XmFileSelectionBox - Motif ; I am writing an application where I would like to add a widget to an XmFileSelectionBox. The case in question is a "Save File" situation where the user is saving an image to a file, and I would like them ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Adding widgets to XmFileSelectionBox

  1. Adding widgets to XmFileSelectionBox

    I am writing an application where I would like to add a widget to an
    XmFileSelectionBox. The case in question is a "Save File" situation
    where the user is saving an image to a file, and I would like them to
    be able to pick the image format using a menu attached to an
    XmCascadeButton. I would like the cascade button to appear between the
    directory list and the "Selection" label.

    According to the Motif documentation, it can't be done:
    XmFileSelectionBox and XmSelectionBox place menu bars at the top of
    the window, and XmPushButtons to the right of the OK button, and the
    placement of all other widget types is undefined.

    Still, I know that this is a pretty common thing to do. For example,
    the "Save" dialog in Acrobat Reader 5.0 has a toggle button labeled
    "optimize" between the directory list and the selection area.
    Unfortunately Acrobat won't talk to editres so I don't know if they
    used a standard XmFileSelectionBox or not.

    Should I write my own file selection box (ouch) or just live with the
    fact that I'll have to place additional widgets *outside* of
    XmFileSelectionBox if I am to have any control over their placements?
    Any thoughts would be most welcome...

    Thanks,

    - Thomas

  2. Re: Adding widgets to XmFileSelectionBox



    Thomas Okken wrote:
    >
    > I am writing an application where I would like to add a widget to an
    > XmFileSelectionBox. The case in question is a "Save File" situation
    > where the user is saving an image to a file, and I would like them to
    > be able to pick the image format using a menu attached to an
    > XmCascadeButton. I would like the cascade button to appear between the
    > directory list and the "Selection" label.
    >
    > According to the Motif documentation, it can't be done:
    > XmFileSelectionBox and XmSelectionBox place menu bars at the top of
    > the window, and XmPushButtons to the right of the OK button, and the
    > placement of all other widget types is undefined.
    >
    > Still, I know that this is a pretty common thing to do. For example,
    > the "Save" dialog in Acrobat Reader 5.0 has a toggle button labeled
    > "optimize" between the directory list and the selection area.
    > Unfortunately Acrobat won't talk to editres so I don't know if they
    > used a standard XmFileSelectionBox or not.
    >
    > Should I write my own file selection box (ouch) or just live with the
    > fact that I'll have to place additional widgets *outside* of
    > XmFileSelectionBox if I am to have any control over their placements?
    > Any thoughts would be most welcome...
    >
    > Thanks,
    >
    > - Thomas


    The XmFileSelectionBox allows you to add one child as the work area; it
    is placed just above the Selection textbox. If this widget is a manager
    (like an XmForm), you can place any number of other widgets in it. See
    O'Reilly Volume 6A, Chapters 6 and 7.
    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Common User Interface Services
    M/S 2R-94 (206)544-5225

+ Reply to Thread