I also ran into this problem. If you have a series of buttons that you are using as a contextual menu (buttons like new, delete, duplicate, print, etc.) the active state styling overrides any hover styling as soon as one of the several buttons are clicked.
For example, if you click delete, the script runs and the record is deleted. However, since the delete button was physically clicked, the next time you enter the contextual menu the delete button seems to take on the "active" state and the hover properties no longer get applied (the button remains with a white background even though it is set to have a grey background on hover). This seems to happen even if you have "None" selected as the active button in the button bar setup dialogue.
It's unfortunate that the active state overrides all others with no option to disable the state entirely, or rearrange the css hierarchy. I'm finding that I might have to revert to separate buttons in a contextual menu since this behavior is really only useful with a navigation type button bar set up.
Hopefully there is way to get around this behavior, but I haven't found it yet.
4 of 4 people found this helpful
Here is the solution:
STEP 1 - enter FALSE into the "Active Segment" calculation
STEP 2 - add a COMMIT step into your script if [one of] the segments creates a new record
STEP 3 - there is not a STEP 3
Look at the attached file
Well done. Thank you.
If you have a button bar with a segment as popover button which shows another button bar with multiple buttons
the COMMIT step is necessary as like as a Refresh Object [ "yourPopoverName" ] (*)
Without the refresh, the pressed segment remains active!
(*) the popover display object, not the popover button!
THank You! Same problem here.. Like 'step 3'
(although I'm thinking that the native process has to be adjusted)
Two kind of problems:
- Segment in Focus
- —> Commit
- Active segment
- —> Refresh
These work in my [and most] case
- Segment in Focus
Actually, Commit seems to be the only option that works for me in the case of a button bar with only a single button. Refresh Object does not restore the button to respond to hover etc. Even with FALSE in the Active button option.
With a multi button bar, then the False option seems to work.
Does anyone know what result the Specify option must return in order to select the active segment. I tried returning the name of the segment, but that did not work. There is no way that I see to address the individual segment from within a calc. The help provides no guidance.
>Actually, Commit seems to be the only option that works for me in the case of a button bar with only a single button.
Correct! In this case only the script step Commit fix the "problem"! The Commit option of Show Custom Dialog doesn't work!
But since a single button-button-bar is not the only situation you may face, I have suggested tricks to remove the active segment in more complex situations.
BTW you have to spend some time customizing your scripts case by case.
Anyway, your post seems to be solved; if you have any different trouble, please attach your file.
PS download the two files, please.
I have found that setting the Active button to a value that does not exist in the segment names clears the active status without a commit
Segments in a button bar accept TRIGGERS!
(Button bars not, of course!)
Be careful that you should not set programmatically the active segment, because the user can click another segment and nullify your work!
This is the meaning of the calculation = FALSE but, sometime it is not enough. Without COMMIT if your segment as button creates a record, the segment stay in Ficus and Active.
We have a lot of things to discover about Button Bars.
This is a fantastic thread!
Sent from Steve's iPad!
Yup, understand the meaning of '=False', didn't try that because my logic told me that the option of 'none' would be the same as =False, and that didn't work so I tried setting it to a non existant name!
I still cannot get that to work. I have tried setting it to "NoValue" but the segment still goes active and stays that way.
The only thing that seems to work right now is a commit. Not a very good option.