Var menu = new Ext. menu. Menu ();
Menu. add
(
{
Text: "font size ",
Menu:
[
New Ext. menu. CheckItem ({text: "big", group: "font "}),
New Ext. menu. CheckItem ({text: "medium", group: "font "}),
New Ext. menu. CheckItem ({text: "small", group: "font "})
]
},
{
Text: "font ",
Menu:
[
New Ext. menu. CheckItem ({text: "bold "}),
New Ext. menu. CheckItem ({text: "italic "})
]
}
}
Var btn1 = new Ext. Button
({
Text: "file", cls: 'x-btn-text-icon ', icon: "../Images/Menus/house.png ",
Menu:
[
{Text: "Open", icon: "../Images/Menus/house.png "},
{Text: "save", icon: "../Images/Menus/house.png "},
{Text: "delete "},
{Text: "close "},
{Text: "quit "}
]
});
Var btn2 = new Ext. Button
({
Text: "edit", cls: 'x-btn-text-icon ', icon: "../Images/Menus/house.png ",
Menu:
[
{Text: "copy", icon: "../Images/Menus/house.png "},
{Text: "copy", icon: "../Images/Menus/house.png "},
'-',
{Text: "Search "},
{Text: "replace "}
]
});
Var toolbar = new Ext. Toolbar
({
Width: 300, height: 200, items: [btn1, btn2], renderTo: "BuildMenu5"
});
Var btn = new Ext. Button
({
Text: "other", cls: 'x-btn-text-icon ', icon: "../Images/Menus/house.png ",
Menu:
[
{Text: "select date", icon: "../Images/Menus/house.png", menu: new Ext. menu. DateMenu ()},
{Text: "select color", icon: "../Images/Menus/house.png", menu: new Ext. menu. ColorMenu ()}
]
}); Www.2cto.com
Var toolbar = new Ext. Toolbar
({
Width: 300, height: 200, items: [btn], renderTo: "BuildMenu5"
Author: huang798807481