ButtonSegment Control

a horizontal control which consists of several separate buttons


idstring|numberthe button's id
typestringthe "buttonSegment" 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', list:[
      {id : "group_1", type : "group", list : [
        {id: "open", type:"buttonSegment", text:"Open", img : "48/open.gif"},
        {id: "print",type:"buttonSegment", text:"Print" , img : "48/printer.png"},
        {id: "preview",type:"buttonSegment",text:"Preview",img:"48/zoom_selection.png"}
      {id : "group_2", type : "group", list : [
        {"id":"copy", "type":"buttonSegment", "text":"copy", "img":"48/copy.gif"},
        {"id":"go_to", "type":"buttonSegment", "text":"go to", "img":"48/tab_go.png"}
      {"id":"bold", "type":"buttonSegment", "text":"bold", "img":"18/text_bold.png"},

Related sample:  Init from object

Back to top