yet another toggle button question... user selects radio box toggle, then selects it again... - Motif

This is a discussion on yet another toggle button question... user selects radio box toggle, then selects it again... - Motif ; Hi, I am trying to use pixmaps on toggle buttons in a radio box to emulate folder tabs. The user can select a folder tab, and based on the selection gets a different table of information. I have the following ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: yet another toggle button question... user selects radio box toggle, then selects it again...

  1. yet another toggle button question... user selects radio box toggle, then selects it again...

    Hi,

    I am trying to use pixmaps on toggle buttons in a radio box to emulate
    folder tabs. The user can select a folder tab, and based on the
    selection gets a different table of information.

    I have the following problem:
    The user can select a toggle button and everything is fine.
    However, if the user selects the same toggle again (say they
    double-click it), it appears to become unselected. This gives the
    illusion that there are no selected items in the radio box. How do I
    make it so that the user can't change the pixmap back to the
    un-selected version by clicking on the same choice multiple times?

    This appears to only be a problem if the indicator is set to off in
    the resource file.

    I am using
    openmotif 2.1.30

    Thanks

    Travis

  2. Re: yet another toggle button question... user selects radio box toggle,then selects it again...



    Travis wrote:
    >
    > Hi,
    >
    > I am trying to use pixmaps on toggle buttons in a radio box to emulate
    > folder tabs. The user can select a folder tab, and based on the
    > selection gets a different table of information.
    >
    > I have the following problem:
    > The user can select a toggle button and everything is fine.
    > However, if the user selects the same toggle again (say they
    > double-click it), it appears to become unselected. This gives the
    > illusion that there are no selected items in the radio box. How do I
    > make it so that the user can't change the pixmap back to the
    > un-selected version by clicking on the same choice multiple times?
    >
    > This appears to only be a problem if the indicator is set to off in
    > the resource file.
    >
    > I am using
    > openmotif 2.1.30
    >
    > Thanks
    >
    > Travis


    I do not understand what you mean by saying the button "appears to
    become unselected", and that it "gives the illusion that there are no
    selected items in the radio box."

    What happens if you remove the pixmaps from the buttons? When the user
    clicks on the button, the icon should appear as filled (selected). If
    you have set it up as a radio button, clicking on it again should not
    un-select it; it should remain selected. Are you sure it is set up for
    radio behavior, not just toggle?

    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Common User Interface Services
    M/S 2R-94 (206)544-5225

  3. Re: yet another toggle button question... user selects radio box toggle, then selects it again...

    Travis wrote:

    > I am trying to use pixmaps on toggle buttons in a radio box to emulate
    > folder tabs. The user can select a folder tab, and based on the
    > selection gets a different table of information.
    >
    > I have the following problem:
    > The user can select a toggle button and everything is fine.
    > However, if the user selects the same toggle again (say they
    > double-click it), it appears to become unselected. This gives the
    > illusion that there are no selected items in the radio box. How do I
    > make it so that the user can't change the pixmap back to the
    > un-selected version by clicking on the same choice multiple times?
    >
    > This appears to only be a problem if the indicator is set to off in
    > the resource file.
    >
    > I am using
    > openmotif 2.1.30


    I've seen exactly the same behaviour under OM 2.1.30 on Linux -- while the
    same code works perfectly with Solaris 7/8/9 Motif 2.1. I'm fairly sure this
    is a bug in OM.

    When you click an already selected ToggleButton with indicatorOn set to
    False in a radio box, the widget shadow goes back from "recessed" to
    "raised", just as if it were deselected. If you click it again, it remains
    "raised". No state change events are sent to the ToggleButton.

    I've found one workaround: Set the radioBehavior resource to True *after*
    you have created all the ToggleButton children. Then it works the way it
    should also under OpenMotif.

    --
    Per Espen Hagen



  4. Re: yet another toggle button question... user selects radio box toggle, then selects it again...

    > I do not understand what you mean by saying the button "appears to
    > become unselected", and that it "gives the illusion that there are no
    > selected items in the radio box."
    >
    > What happens if you remove the pixmaps from the buttons? When the user
    > clicks on the button, the icon should appear as filled (selected). If
    > you have set it up as a radio button, clicking on it again should not
    > un-select it; it should remain selected. Are you sure it is set up for
    > radio behavior, not just toggle?


    I'm pretty sure I have it set up as a radio button. When I set it
    such that the indicator is displayed, I get the following scenario:

    1) When I click a (Currently unselected) radio button, the indicator
    for that radio button becomes highlighted, and the pixmap changes from
    the "label pixmap" to the "select pixmap"

    2) When I click the same button again (having already been selected in
    step 1), the indicator remains selected (as any good radio box should
    do), but the pixmap for the button goes from the "select pixmap" back
    to the "label pixmap" and thus appears unselected.

    3) Each additional time I click the same button, the indicator stays
    selected, but the pixmap stays in the "label pixmap" state. The only
    way to ever get back to the "select pixmap" state is to click a
    different radio button, and then select the first button again.

    Have you ever seen anything like this?

    What could be wrong?

    Thanks

    Travis

  5. Re: yet another toggle button question... user selects radio box toggle, then selects it again...

    In article "Per Espen Hagen" writes:
    >Travis wrote:


    >> I have the following problem:
    >> The user can select a toggle button and everything is fine.
    >> However, if the user selects the same toggle again (say they
    >> double-click it), it appears to become unselected. This gives the
    >> illusion that there are no selected items in the radio box. How do I
    >> make it so that the user can't change the pixmap back to the
    >> un-selected version by clicking on the same choice multiple times?


    >I've seen exactly the same behaviour under OM 2.1.30 on Linux -- while the
    >same code works perfectly with Solaris 7/8/9 Motif 2.1. I'm fairly sure this
    >is a bug in OM.


    See MotifZone/Bugzilla bugs number 1154 and 1164. I'm not sure these are the
    same bug, but it sounds familiar.

    -Pete Zakel
    (phz@seeheader.nospam)

    "I absolutely refuse to reveal my age. What am I? A car?"

    -Cyndi Lauper

  6. Re: yet another toggle button question... user selects radio box toggle, then selects it again...

    Per Espen Hagen and Pete Zakel, you guys are awesome. Those appear to
    be the same bug, and the workaround worked like a charm. Thank you
    for taking the time to help me out.

    Cool.

    Travis


    pxhxz@cadence.com (Pete nospam Zakel) wrote in message news:<40a11fe7$1@news.cadence.com>...
    > In article "Per Espen Hagen" writes:
    > >Travis wrote:

    >
    > >> I have the following problem:
    > >> The user can select a toggle button and everything is fine.
    > >> However, if the user selects the same toggle again (say they
    > >> double-click it), it appears to become unselected. This gives the
    > >> illusion that there are no selected items in the radio box. How do I
    > >> make it so that the user can't change the pixmap back to the
    > >> un-selected version by clicking on the same choice multiple times?

    >
    > >I've seen exactly the same behaviour under OM 2.1.30 on Linux -- while the
    > >same code works perfectly with Solaris 7/8/9 Motif 2.1. I'm fairly sure this
    > >is a bug in OM.

    >
    > See MotifZone/Bugzilla bugs number 1154 and 1164. I'm not sure these are the
    > same bug, but it sounds familiar.
    >
    > -Pete Zakel
    > (phz@seeheader.nospam)
    >
    > "I absolutely refuse to reveal my age. What am I? A car?"
    >
    > -Cyndi Lauper


+ Reply to Thread