You've already forked lazarus-ccr
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8741 8e941d3f-bd1b-0410-a28a-d453659cc2b4
172 lines
4.5 KiB
ObjectPascal
172 lines
4.5 KiB
ObjectPascal
unit Unit1;
|
|
|
|
{$MODE Delphi}
|
|
|
|
interface
|
|
|
|
uses
|
|
LCLIntf, LCLType, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, SpkToolbar, StdCtrls, ExtCtrls, ActnList, Menus, spkt_Tab, spkt_Pane,
|
|
ImgList, spkt_BaseItem, spkt_Buttons, spkt_Checkboxes, SpkPopup;
|
|
|
|
type
|
|
|
|
{ TForm2 }
|
|
|
|
TForm2 = class(TForm)
|
|
ActionList1: TActionList;
|
|
Action1: TAction;
|
|
CUsersSpookDokumenty1: TMenuItem;
|
|
DDokumenty1: TMenuItem;
|
|
LargeImages: TImageList;
|
|
Images: TImageList;
|
|
PopupMenu1: TSpkPopupMenu;
|
|
PopupMenu2: TSpkPopupMenu;
|
|
Recent11: TMenuItem;
|
|
Recent21: TMenuItem;
|
|
Recent31: TMenuItem;
|
|
SpkCheckbox1: TSpkCheckbox;
|
|
SpkCheckbox2: TSpkCheckbox;
|
|
SpkPane7: TSpkPane;
|
|
SpkTab3: TSpkTab;
|
|
SpkToolbar1: TSpkToolbar;
|
|
SpkTab1: TSpkTab;
|
|
SpkPane2: TSpkPane;
|
|
SpkSmallButton2: TSpkSmallButton;
|
|
SpkSmallButton3: TSpkSmallButton;
|
|
SpkSmallButton4: TSpkSmallButton;
|
|
SpkLargeButton4: TSpkLargeButton;
|
|
SpkPane3: TSpkPane;
|
|
SpkSmallButton1: TSpkSmallButton;
|
|
SpkSmallButton5: TSpkSmallButton;
|
|
SpkSmallButton6: TSpkSmallButton;
|
|
SpkSmallButton7: TSpkSmallButton;
|
|
SpkSmallButton8: TSpkSmallButton;
|
|
SpkPane4: TSpkPane;
|
|
SpkSmallButton10: TSpkSmallButton;
|
|
SpkLargeButton5: TSpkLargeButton;
|
|
SpkSmallButton9: TSpkSmallButton;
|
|
SpkTab2: TSpkTab;
|
|
SpkPane5: TSpkPane;
|
|
SpkLargeButton6: TSpkLargeButton;
|
|
SpkLargeButton7: TSpkLargeButton;
|
|
SpkLargeButton8: TSpkLargeButton;
|
|
SpkPane1: TSpkPane;
|
|
SpkLargeButton1: TSpkLargeButton;
|
|
SpkLargeButton2: TSpkLargeButton;
|
|
SpkLargeButton3: TSpkLargeButton;
|
|
SpkPane6: TSpkPane;
|
|
SpkSmallButton11: TSpkSmallButton;
|
|
SpkSmallButton12: TSpkSmallButton;
|
|
SpkSmallButton13: TSpkSmallButton;
|
|
procedure Button2Click(Sender: TObject);
|
|
procedure FormCreate(Sender: TObject);
|
|
procedure FormShow(Sender: TObject);
|
|
procedure SpkCheckbox1Click(Sender: TObject);
|
|
procedure SpkCheckbox2Click(Sender: TObject);
|
|
procedure SpkPane2MoreOptionsButtonClick(Sender: TObject);
|
|
procedure SpkPane3MoreOptionsButtonClick(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
end;
|
|
|
|
var
|
|
Form2: TForm2;
|
|
|
|
implementation
|
|
|
|
{$R *.lfm}
|
|
|
|
procedure TForm2.Button2Click(Sender: TObject);
|
|
|
|
var i,j,k : integer;
|
|
Item : TSpkSmallButton;
|
|
Pane : TSpkPane;
|
|
Tab : TSpkTab;
|
|
|
|
begin
|
|
SpkToolbar1.BeginUpdate;
|
|
|
|
for i := 0 to 20 do
|
|
Tab:=SpkToolbar1.Tabs.add;
|
|
|
|
for k := 0 to 6 do
|
|
begin
|
|
Pane:=SpkTab1.Panes.Add;
|
|
for j := 0 to 2 do
|
|
begin
|
|
Item:=Pane.Items.AddSmallButton;
|
|
Item.TableBehaviour:=tbBeginsRow;
|
|
//Item.GroupBehaviour:=gbBeginsGroup;
|
|
Item.ShowCaption:=false;
|
|
Item.ImageIndex:=random(50);
|
|
//Item.DropdownMenu:=PopupMenu1;
|
|
|
|
for i := 0 to 4 do
|
|
begin
|
|
Item:=Pane.Items.AddSmallButton;
|
|
Item.ShowCaption:=false;
|
|
Item.ImageIndex:=random(50);
|
|
//Item.GroupBehaviour:=gbContinuesGroup;
|
|
//Item.DropdownMenu:=PopupMenu1;
|
|
end;
|
|
|
|
Item:=Pane.Items.AddSmallButton;
|
|
Item.TableBehaviour:=tbContinuesRow;
|
|
//Item.GroupBehaviour:=gbEndsGroup;
|
|
Item.ShowCaption:=false;
|
|
Item.ImageIndex:=random(50);
|
|
//Item.DropdownMenu:=PopupMenu1;
|
|
end;
|
|
end;
|
|
|
|
SpkToolbar1.EndUpdate;
|
|
end;
|
|
|
|
procedure TForm2.FormCreate(Sender: TObject);
|
|
begin
|
|
//
|
|
end;
|
|
|
|
procedure TForm2.FormShow(Sender: TObject);
|
|
begin
|
|
SpkCheckbox1.Checked := SpkToolbar1.ShowMenuButton;
|
|
if (SpkToolbar1.MenuButtonStyle = mbsCaption) then
|
|
SpkCheckbox2.Checked := false
|
|
else
|
|
SpkCheckbox2.Checked := true;
|
|
end;
|
|
|
|
procedure TForm2.SpkCheckbox1Click(Sender: TObject);
|
|
begin
|
|
SpkToolbar1.ShowMenuButton := not SpkToolbar1.ShowMenuButton;
|
|
SpkCheckbox1.Checked := SpkToolbar1.ShowMenuButton;
|
|
end;
|
|
|
|
procedure TForm2.SpkCheckbox2Click(Sender: TObject);
|
|
begin
|
|
if (SpkToolbar1.MenuButtonStyle = mbsCaption) then
|
|
SpkToolbar1.MenuButtonStyle := mbsCaptionDropdown
|
|
else
|
|
SpkToolbar1.MenuButtonStyle := mbsCaption;
|
|
|
|
if (SpkToolbar1.MenuButtonStyle = mbsCaption) then
|
|
SpkCheckbox2.Checked := false
|
|
else
|
|
SpkCheckbox2.Checked := true;
|
|
end;
|
|
|
|
procedure TForm2.SpkPane2MoreOptionsButtonClick(Sender: TObject);
|
|
begin
|
|
ShowMessage('You clicked on ''More options'' button of the File pane.');
|
|
end;
|
|
|
|
procedure TForm2.SpkPane3MoreOptionsButtonClick(Sender: TObject);
|
|
begin
|
|
ShowMessage('You clicked on ''More options'' button of the Edit pane.');
|
|
end;
|
|
|
|
end.
|