Check documentation for the latest version of dhtmlxSuite ButtonTwoState Control DHTMLX Docs

ButtonTwoState Control

a button that can remain in one of its two states until its current state is changed by user (either from script or from page):

Attributes

idstring|numberthe button's id
typestringthe "buttonTwoState" type
textstringthe button's label
imgstringthe icon of the button in the enabled state
imgdisstringthe icon of the button in the disabled state
isbigbooleandefines whether the button is big or small, false by default
disablebooleandefines whether the button is enabled or disabled, false by default
statebooleandefines whether the button is initially clicked, false by default


myRibbon = new dhtmlXRibbon({
  parent: "myRibbon",
  icons_path: "../codebase/ribbon/",
  items : [
      {type:'block', text:'office document', mode:'cols', list:[
        {id:"open",type:"buttonTwoState",text:"Open",isbig:true,img:"48/open.gif"},
        {id:"print",type:"buttonTwoState",text:"Quick<br />print",img:"48/printer.png",
         isbig:true},
        {id:"preview",type:"buttonTwoState",text:"Print<br />preview",isbig:true,
         img:"48/zoom_selection.png"}
      ]},
      {type:'block', text:'edit', list:[
        {"id":"copy","type":"buttonTwoState","text":"copy","img":"48/copy.gif"},
        {"id":"find","type":"buttonTwoState","text":"find","img":"48/page_find.png"},
        {"id":"go_to","type":"buttonTwoState","text":"go to","img":"48/tab_go.png"}
      ]},
      {"type":"block", "text":"page setup", "list":[
        {"id":"page_setup","type":"buttonTwoState","text":"page<br />setup",
         "isbig":true,"img":"48/pencil_ruler.png"},
        {"id":"printing_area","type":"buttonTwoState","text":"printing<br />area", 
         "isbig":true,"img":"48/printer_add.png"}
      ]},
  ]
});

Related sample:  Init from object

Back to top