Type
TForm1 = Class(TForm)
AnaMenu : TMainMenu;
ControlBar : TControlBar;
MenuCubugu : TToolBar;
Procedure FormCreate(Sender: TObject);
Private
Public
End;
Var
Form1 : TForm1;
Implementation
{$R *.DFM}
Procedure TForm1.FormCreate(Sender: TObject);
Var
MenuNo,MenuGenisligi : Integer;
MenuElemani : TToolButton;
Begin
MenuGenisligi:=0;
For MenuNo:=AnaMenu.Items.Count-1 DownTo 0 Do
Begin
MenuElemani:=TToolButton.Create(MenuCubugu);
MenuElemani.Parent:=MenuCubugu;
MenuElemani.AutoSize:=True;
MenuElemani.Grouped:=True;
MenuElemani.Caption:=AnaMenu.Items[MenuNo].Caption;
MenuElemani.MenuItem:=AnaMenu.Items[MenuNo];
Inc(MenuGenisligi,MenuElemani.Width);
End;
MenuCubugu.Width:=MenuGenisligi;
Menu:=Nil;
End;
//
// ToolBar'in Flat özelligini True yapin.
//
// Kolay Gelsin.
//
// Hakan HAMURCU
// hamurcu@delphiturk.com
//