View Full Version : Having Button Text Stay A Certain Color
webnc1
10-04-2004, 09:20 AM
I'm creating a walk-though of certain features of our program. I have several buttons on the left side of the window. Once a user has clicked on a button, I want the text on a button to remain a different color to show the user he has already reviewed the text or activities on that particular button.
I've changed the style on the button to be toggle - up. I've also entered the command Button.SetState("ToggleButton1", BTN_DOWN); on the click, enter, and leave tabs. ("ToggleButton1" was changed to match the object.)
When I click the first button it turns the color I want, but when I click the second button, all button return to their original color. When I click back to the first button, the buttons then turn to the color I expected.
Help. Am I using the correct command?
longedge
10-04-2004, 09:46 AM
You can do this by setting a variable and then using it to set the button state in the On Enter and On Leave events like this -
webnc1
10-04-2004, 10:56 AM
I appreciate your direction. Followed your instructions but I'm still getting sporadic results. Want to take a look at my file and see if you can see anything?
Yours worked great!
----------------
I'll have to keep working on this. I see this file did not come across as I expected.
webnc1
10-04-2004, 03:03 PM
It appears the text does not want to stay as BTN_DOWN as you move from page to page. If I have 12 different pages, doesn't the command have to be on the ENTER and LEAVE tab on every button?
Hope someone can point me in the right direction.
if (clicked1==1) then Button.SetState("Button1", BTN_DOWN) end
if (clicked2==1) then Button.SetState("Button2", BTN_DOWN) end
if (clicked3==1) then Button.SetState("Button3", BTN_DOWN) end
if (clicked4==1) then Button.SetState("Button4", BTN_DOWN) end
if (clicked5==1) then Button.SetState("Button5", BTN_DOWN) end
if (clicked6==1) then Button.SetState("Button6", BTN_DOWN) end
if (clicked7==1) then Button.SetState("Button7", BTN_DOWN) end
if (clicked8==1) then Button.SetState("Button8", BTN_DOWN) end
if (clicked9==1) then Button.SetState("Button9", BTN_DOWN) end
if (clicked10==1) then Button.SetState("Button10", BTN_DOWN) end
if (clicked11==1) then Button.SetState("Button11", BTN_DOWN) end
if (clicked12==1) then Button.SetState("Button12", BTN_DOWN) end
yosik
10-04-2004, 03:27 PM
In your case, I would suggest you to use images instead of button objects. It may be more preparation work, but at the end of the day, you can pretty much do anything visual design wise for the images. Just have images for each state and use Image.Load action to load the relevant image into your object. You could also set a label text on top of a fixed image, have a different opacity, use a shape pluging object semi transparent on top of your image, use a flash object...anything really.
Good luck
Yossi
longedge
10-04-2004, 04:37 PM
If I have 12 different pages, doesn't the command have to be on the ENTER and LEAVE tab on every button?
You only need to design the global parts of a page once.
If the buttons on all the pages each link to the same target which presumably they must do, you can use the Page Inherit Objects in the properties inspector. Or just do a page duplicate.
The variable is global.
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.