<custombutton>

JavaScript: lz.custombutton
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"

Attributes

Name (CSS property) Type (tag) Type (js) Default Category
collapsedWidth expression any 30 read/write
  min width of button
expandedWidth expression any this.width read/write
  max width of button
iconname string String   read/write
  icon resource name prefix
iconspace expression any 2 read/write
  fine-tune the horizontal spacing of icon to text
iconstretches string String none read/write
  controls whether the icon stretches (none|both)
icony expression any null read/write
  fine-tune the vertical position of icon
leftrsc string String custombutton_small_left_rsc read/write
  background resources
middlersc string String custombutton_small_middle_rsc read/write
   
rightrsc string String custombutton_small_right_rsc read/write
   
text html lz.html   read/write
  text to display in the button (can leave empty)
texty expression any 0 read/write
  use to fine-tune text y position

Methods

doEnterDown()
custombutton.doEnterDown();

doEnterUp()
custombutton.doEnterUp();

iconPlay()
custombutton.iconPlay();

iconStop()
custombutton.iconStop();

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Events inherited from <basebutton>

onclick, onresourceviewcount

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy