Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »


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.

View XML
<submit label="button.label.perform_action" action="performAction">
  <appearance function="submitButtonAppearance"/>
</submit>
button.label.perform_action=Perform action


DSL_APPEARANCE submitButtonAppearance() {

	// 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;
}

Highlighted button appearance


Disabled button appearance



  • No labels