source: trunk/Packages/bgracontrols/testbgracontrols/uribbon.pas

Last change on this file was 2, checked in by chronos, 5 years ago
File size: 1.5 KB
Line 
1unit uribbon;
2
3{$mode objfpc}{$H+}
4
5interface
6
7uses
8 Forms, BGRAVirtualScreen, BGRAButton, BGRABitmap;
9
10type
11
12 { TfrmMain }
13
14 TfrmRibbon = class(TForm)
15 btnMini1: TBGRAButton;
16 btnMini2: TBGRAButton;
17 btnMini3: TBGRAButton;
18 btnBig: TBGRAButton;
19 btnList: TBGRAButton;
20 btnSeparator2: TBGRAButton;
21 btnTab: TBGRAButton;
22 btnHelp: TBGRAButton;
23 btnSeparator1: TBGRAButton;
24 btnMenu: TBGRAButton;
25 vsBody: TBGRAVirtualScreen;
26 vsTab: TBGRAVirtualScreen;
27 vsForm: TBGRAVirtualScreen;
28 procedure vsBodyRedraw(Sender: TObject; Bitmap: TBGRABitmap);
29 procedure vsTabRedraw(Sender: TObject; Bitmap: TBGRABitmap);
30 procedure vsFormRedraw(Sender: TObject; Bitmap: TBGRABitmap);
31 procedure FormCreate(Sender: TObject);
32 private
33 { private declarations }
34 public
35 { public declarations }
36 end;
37
38var
39 frmRibbon: TfrmRibbon;
40
41implementation
42
43{$R *.lfm}
44
45uses
46 bgraribbon;
47
48{ TfrmMain }
49
50procedure TfrmRibbon.vsBodyRedraw(Sender: TObject; Bitmap: TBGRABitmap);
51begin
52 DrawBodyGradient(Bitmap);
53end;
54
55procedure TfrmRibbon.vsTabRedraw(Sender: TObject; Bitmap: TBGRABitmap);
56begin
57 DrawTabGradient(Bitmap);
58end;
59
60procedure TfrmRibbon.vsFormRedraw(Sender: TObject; Bitmap: TBGRABitmap);
61begin
62 DrawFormGradient(Bitmap);
63end;
64
65procedure TfrmRibbon.FormCreate(Sender: TObject);
66begin
67 RibbonMenu(btnMenu);
68 RibbonTab(btnTab);
69 RibbonButton(btnHelp);
70 StyleRibbonBody(vsBody);
71
72 btnList.Style := bbtDropDown;
73end;
74
75end.
Note: See TracBrowser for help on using the repository browser.