Traditional Menu
Create a dxsubitem that is equivalent to creating a main menu item
Dxbarsubitem: = Tdxbarsubitem.create (self);
Dxbarsubitem.caption: = scategory;
Dxbarsubitem.category: = 0;
Dxbarsubitem.visible: = ivalways;//ivnever;//
Dxbarsubitem.name: = SName;
Placed on the Dxbar
Dxbaritemlink: = Dxbarsubitem.barmanager.bars[0]. Itemlinks.add;
Dxbaritemlink.item: = Dxbarsubitem;
Create a Dxbarbutton, which is equivalent to creating a menu item
Dxbarbutton: = Tdxbarbutton.create (self);//memory resource is managed by self
Dxbarbutton.caption: = Smenu;
Dxbarbutton.action: = Taction (Actionmanger1.actions[iaction]);
Dxbarbutton.category: = 0;
Dxbarbutton.tag: = Taction (Actionmanger1.actions[iaction]). Tag;
Dxbarbutton.name: = Taction (Actionmanger1.actions[iaction]). Name;//format (' dxbarbutton_%-2d ', [ii]);
Dxbaritemlink: = DXBARSUBITEM.ITEMLINKS.ADD;
Dxbaritemlink.item: = Dxbarbutton;
Dxbarmanager Create a menu of traditional drop-down styles