Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Description

As of Helium 1.46, the normal button, submit button, and view action buttons support appearance bindings. These can be used to programatically alter the appearance of buttons beyond the default appearance.

Code Block
languagexml
titleView XML
<submit label="button.label.perform_action" action="performAction">
  <appearance function="submitButtonAppearancebuttonAppearance"/>
</submit>


Code Block
button.label.perform_action=Perform action



Code Block
DSL_APPEARANCE submitButtonAppearancebuttonAppearance() {

	// Preference to disabled appearance 
    if(disableButton()) {
		return DSL_APPEARANCE.Disable;
	}
	else if(highlightButton()) {
		return DSL_APPEARANCE.Highlight;
	}

	// returning null here implies default appearance
	// equivalent to return DSL_APPEARANCE.Default
	return null;
}


Info
titleHighlighted Button & submit button appearance

Image Added


Info
titleDisabled button View action appearance

Image Added