Highlight Toggles

SueBK

Registered User.
Local time
Tomorrow, 04:16
Joined
Apr 2, 2009
Messages
197
I have a form with a series of "traffic lights". These are indivdiual toggle buttons, with an option value that corresponds to a table "Status Options", and feeds another Table "Project Status".

So - if the green light is clicked the option value is 1, the status options table says that's green, the project status then registers green. (The traffic light colour system is a client requirement).

At the moment the toggle buttons have images embedded to give them the appropriate colour. The user simply chooses the appropriate colour for the status of their project.

Problem: it's very hard to tell which toggle button has been selected. Is there an (easy) way to highlight the selected toggle and/or dim the unselected ones?
 
Are you using an Option Group or individual command buttons?
 
What you need are six images 1 bright and 1 dim for each colour. Place the dim images over the bright images respectively. Then lets say you click on the dim green image. You would make that image invisible (thus making the bright one visible) and make the amber and red bright images invisible (thus making the dim amber and green images visible).

When using the OnCurrent event of the form test the value of the project status control and use a small routine to set the images on/off accordingly.

David
 
So, if all my buttons are defaulted to the dims, because they're in front. All I need is a code on each dim button that says "on click, make invisible".

Ah, but I would also need it to make the other two visible, in case the choice changes. If someone chooses green today, I need to "reset" if they choose red tomorrow. Hmmm, shall have a play.

thank you.
 
Hit the first snag - no "on click" option for the toggle buttons. I tried "on focus" but I get an error message telling I can't hide a button that has the focus.
 
try after update event, (or before update) not click event

all a button does is clicks on and off, so there is no click event as such
 
I worked around it. The two layers of buttons wasn't working, 'cause once you made a selection you couldn't change it. I thought about making them Option 1 through 6, and just having repeating value in my table (ie Option 1 and 4 are both "green"), but it basically was getting too hard.

Clicking the toggle button looks up the option values, and puts the appropriate value in a field in my table. I've put a combo box for that field on my form. It's been conditionally formatted against the option value - the box and text both change colour (so the text is effectively hidden). It's labelled "Current Status"; and I 'hid' the drop down arrow with a rectangle the same colour as the form background. So, if a user clicks the green toggle button, they just see a green box next to current status. As they click the various toggle buttons the colour of the box updates.

Thanks for your input. Some times I think we have to muddle through the possibilities to get to an ultimate answer that may seem totally unconnected.
 

Users who are viewing this thread

Back
Top Bottom