Name

custombutton

Synopsis

LZX: custombutton
JavaScript: custombutton
Type: Class
Access: public
Topic: Incubator.Components
Declared in: lps/components/incubator/custombutton.lzx

Description

The custombutton class can include text and/or an icon, with our app-specific background graphic
          <canvas>
            <include href="incubator/custombutton.lzx"/>
            <custombutton iconname="target" text="Hit Me"/>
          </canvas>
        
the icon should be a resource with a name ending in "_icon_rsc"; the iconname should be that resource name, without the "_icon_rsc"

Superclass Chain

node (LzNode) » view (LzView) » basecomponent » basebutton » custombutton

Known Subclasses

Details

Properties (11)

collapsedWidth
<attribute name="collapsedWidth" value="30" />
public var collapsedWidth;
min width of button
expandedWidth
<attribute name="expandedWidth" value="$once{this.width}" />
public var expandedWidth;
max width of button
iconname
<attribute name="iconname" type="string" value="" />
public var iconname : String;
icon resource name prefix
iconspace
<attribute name="iconspace" value="2" />
public var iconspace;
fine-tune the horizontal spacing of icon to text
iconstretches
<attribute name="iconstretches" type="string" value="none" />
public var iconstretches : String;
controls whether the icon stretches (none|both)
icony
<attribute name="icony" value="null" />
public var icony;
fine-tune the vertical position of icon
leftrsc
<attribute name="leftrsc" type="string" value="custombutton_small_left_rsc" />
public var leftrsc : String;
background resources
middlersc
<attribute name="middlersc" type="string" value="custombutton_small_middle_rsc" />
public var middlersc : String;
rightrsc
<attribute name="rightrsc" type="string" value="custombutton_small_right_rsc" />
public var rightrsc : String;
text
<attribute name="text" type="html" value="" />
public var text : html;
text to display in the button (can leave empty)
texty
<attribute name="texty" value="0" />
public var texty;
use to fine-tune text y position

Methods (4)

doEnterDown()
<method name="doEnterDown" />
public function doEnterDown();
doEnterUp()
<method name="doEnterUp" />
public function doEnterUp();
iconPlay()
<method name="iconPlay" />
public function iconPlay();
iconStop()
<method name="iconStop" />
public function iconStop();

LZX Synopsis

<class name="custombutton" extends=" basebutton ">
  <attribute name=" collapsedWidth " value="30" />
  <attribute name=" expandedWidth " value="$once{this.width}" />
  <attribute name=" iconname " type="string" value="" />
  <attribute name=" iconspace " value="2" />
  <attribute name=" iconstretches " type="string" value="none" />
  <attribute name=" icony " value="null" />
  <attribute name=" leftrsc " type="string" value="custombutton_small_left_rsc" />
  <attribute name=" middlersc " type="string" value="custombutton_small_middle_rsc" />
  <attribute name=" rightrsc " type="string" value="custombutton_small_right_rsc" />
  <attribute name=" text " type="html" value="" />
  <attribute name=" texty " value="0" />
  <method name=" doEnterDown " />
  <method name=" doEnterUp " />
  <method name=" iconPlay " />
  <method name=" iconStop " />
</class>

JavaScript Synopsis

public custombutton extends  basebutton  {
  public var collapsedWidth ;
  public var expandedWidth ;
  public var iconname  : String;
  public var iconspace ;
  public var iconstretches  : String;
  public var icony ;
  public var leftrsc  : String;
  public var middlersc  : String;
  public var rightrsc  : String;
  public var text  : html;
  public var texty ;
  prototype public function doEnterDown ();
  prototype public function doEnterUp ();
  prototype public function iconPlay ();
  prototype public function iconStop ();
}