TLama

Untitled

Jan 15th, 2014
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.61 KB | None | 0 0
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   Button: TButton;
  4.   Group: TRibbonGroup;
  5.   TabItem: TRibbonTabItem;
  6. begin
  7.   TabItem := Ribbon1.Tabs.Add;
  8.   TabItem.Caption := 'Tab caption';
  9.   // let the controls be owned by the ribbon control
  10.   Group := TRibbonGroup.Create(Ribbon1);
  11.   // in the reference for the TRibbonGroup class is mentioned "Ribbon groups are placed on a ribbon page",
  12.   // so let's do it so
  13.   Group.Parent := TabItem.Page;
  14.   Group.Caption := 'Group caption';
  15.   // let the controls be owned by the ribbon control
  16.   Button := TButton.Create(Ribbon1);
  17.   Button.Parent := Group;
  18. end;
Advertisement
Add Comment
Please, Sign In to add comment