TLama

Untitled

Jan 15th, 2014
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.65 KB | None | 0 0
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   Group: TRibbonGroup;
  4.   TabItem: TRibbonTabItem;
  5.   BarItem: TActionBarItem;
  6.   BarAction: TActionClientItem;
  7. begin
  8.   TabItem := Ribbon1.Tabs.Add;
  9.   TabItem.Caption := 'Tab caption';
  10.  
  11.   Group := TRibbonGroup.Create(Ribbon1);
  12.   Group.Parent := TabItem.Page;
  13.   Group.Caption := 'Group caption';
  14.  
  15.   BarItem := ActionManager1.ActionBars.Add;
  16.  
  17.   BarAction := BarItem.Items.Add;
  18.   BarAction.Action := Action1;
  19.   BarAction.Caption := 'Action 1 caption';
  20.  
  21.   BarAction := BarItem.Items.Add;
  22.   BarAction.Action := Action2;
  23.   BarAction.Caption := 'Action 2 caption';
  24.  
  25.   BarItem.ActionBar := Group;
  26. end;
Advertisement
Add Comment
Please, Sign In to add comment