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
Re: yet another toggle button question... user selects radio box toggle,then selects it again...
Travis wrote:[color=blue]
>
> 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[/color]
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
Re: yet another toggle button question... user selects radio box toggle, then selects it again...
Travis wrote:
[color=blue]
> 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[/color]
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
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[color=blue]
> 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?[/color]
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
Re: yet another toggle button question... user selects radio box toggle, then selects it again...
In article <IV8oc.794$RL3.24832@news2.e.nsc.no> "Per Espen Hagen" <peh@ffi.no> writes:[color=blue]
>Travis wrote:[/color]
[color=blue][color=green]
>> 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?[/color][/color]
[color=blue]
>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.[/color]
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
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
[email]pxhxz@cadence.com[/email] (Pete nospam Zakel) wrote in message news:<40a11fe7$1@news.cadence.com>...[color=blue]
> In article <IV8oc.794$RL3.24832@news2.e.nsc.no> "Per Espen Hagen" <peh@ffi.no> writes:[color=green]
> >Travis wrote:[/color]
>[color=green][color=darkred]
> >> 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?[/color][/color]
>[color=green]
> >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.[/color]
>
> 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[/color]