SmartClient Version: v13.0p_2023-04-25/PowerEdition Deployment (built 2023-04-25)
I must be misinterpreting the Checkbox/FormItem API calls to setCheckedDescription and setUncheckedDescription?
What I was attempting to do is to simply change the HOVER content when the box has been checked or unchecked.
In this simple case I want the hover to be: "foo" when the box is unchecked, and "bar" when checked.
I know another way of doing this by defining a changedHandler on the checkbox and when it fires change the hover using the setPrompt("message") depending on if the box is checked or not. But I wanted to believe that these setUncheckedDescription and setCheckDescription would give me a simpler solution.
Am I missing something?
I must be misinterpreting the Checkbox/FormItem API calls to setCheckedDescription and setUncheckedDescription?
Code:
public [URL="https://smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/form/fields/CheckboxItem.html"]CheckboxItem[/URL] setUncheckedDescription(java.lang.String uncheckedDescription)The description shown in a hover when [URL="https://smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/form/fields/FormItem.html#getShowOldValueInHover--"]FormItem.showOldValueInHover[/URL] is enabled and a value represents the unchecked state. [B]Note : [/B]This is an advanced setting Parameters:uncheckedDescription - New uncheckedDescription value. Default value is "unchecked"
Code:
qualifyBy = new CheckboxItem("byCheckBox", "Qualify by Name"); qualifyBy.setDefaultValue(false); qualifyBy.setWrapTitle(false); qualifyBy.setShowTitle(true); qualifyBy.setTitleOrientation(TitleOrientation.RIGHT); qualifyBy.setAlign(Alignment.CENTER); qualifyBy.setVAlign(VerticalAlignment.CENTER); qualifyBy.setHoverWidth(300); //qualifyBy.setPrompt("Default Hover"); qualifyBy.setShowOldValueInHover(true); qualifyBy.setUncheckedDescription("foo"); qualifyBy.setCheckedDescription("bar");
I know another way of doing this by defining a changedHandler on the checkbox and when it fires change the hover using the setPrompt("message") depending on if the box is checked or not. But I wanted to believe that these setUncheckedDescription and setCheckDescription would give me a simpler solution.
Am I missing something?
Comment