mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 18:20:34 +02:00
+ Enhanced testall-app with demo for TPanel, stoppok
git-svn-id: trunk@1540 -
This commit is contained in:
parent
900d9bc5b4
commit
0f5c59201b
@ -82,7 +82,7 @@ type
|
|||||||
//PageControl1 : TPageControl;
|
//PageControl1 : TPageControl;
|
||||||
//TabSheet1, TabSheet2, TabSheet3 : TTabSheet;
|
//TabSheet1, TabSheet2, TabSheet3 : TTabSheet;
|
||||||
PaintBox1 : TPaintBox;
|
PaintBox1 : TPaintBox;
|
||||||
//Panel1 : TPanel;
|
Panel1 : TPanel;
|
||||||
PixMap1 : TPixMap;
|
PixMap1 : TPixMap;
|
||||||
PopupMenu1 : TPopupMenu;
|
PopupMenu1 : TPopupMenu;
|
||||||
Hello, Doctor, FName, Yesterday, Tomorrow : TMenuItem;
|
Hello, Doctor, FName, Yesterday, Tomorrow : TMenuItem;
|
||||||
@ -220,6 +220,16 @@ type
|
|||||||
|
|
||||||
//+++++++++++++ TPaintBox +++++++++++++++++++++++++++++
|
//+++++++++++++ TPaintBox +++++++++++++++++++++++++++++
|
||||||
pntCount : integer;
|
pntCount : integer;
|
||||||
|
//+++++++++++++ TPanel ++++++++++++++++++++++++++++++++
|
||||||
|
Panel2 : TPanel;
|
||||||
|
btPanelNorm : TButton;
|
||||||
|
rgPanelInBevel,
|
||||||
|
rgPanelOutBevel,
|
||||||
|
rgPanelAlign : TRadioGroup;
|
||||||
|
procedure PanelInBevelClick(Sender: TObject);
|
||||||
|
procedure PanelOutBevelClick(Sender: TObject);
|
||||||
|
procedure PanelAlignClick(Sender: TObject);
|
||||||
|
procedure PanelNormClick(Sender:TObject);
|
||||||
//+++++++++++++ TProgressBar ++++++++++++++++++++++++++
|
//+++++++++++++ TProgressBar ++++++++++++++++++++++++++
|
||||||
chbProgText, chbProgDirect, chbProgOrient, chbProgEnable, chbSmooth : TCheckBox;
|
chbProgText, chbProgDirect, chbProgOrient, chbProgEnable, chbSmooth : TCheckBox;
|
||||||
ProgTime : TTimer;
|
ProgTime : TTimer;
|
||||||
@ -667,7 +677,7 @@ begin
|
|||||||
|
|
||||||
TPan := TMenuItem.Create(Self);
|
TPan := TMenuItem.Create(Self);
|
||||||
TPan.Caption := 'TPanel';
|
TPan.Caption := 'TPanel';
|
||||||
TPan.OnClick := @ShowMessage0; //++ Do not exist yet ++
|
TPan.OnClick := @ShowMessage1;
|
||||||
|
|
||||||
TPop := TMenuItem.Create(Self);
|
TPop := TMenuItem.Create(Self);
|
||||||
TPop.Caption := 'TPopupMenu';
|
TPop.Caption := 'TPopupMenu';
|
||||||
@ -2041,7 +2051,23 @@ PaintBox1 := TPaintBox.Create(Self); //Gives Access violation !!!
|
|||||||
Width := 100;
|
Width := 100;
|
||||||
end;
|
end;
|
||||||
//++++++++++++++++++++++++++++++++++++ Panel1 +++++++++++++++++++++++++++++++++++++++
|
//++++++++++++++++++++++++++++++++++++ Panel1 +++++++++++++++++++++++++++++++++++++++
|
||||||
|
benchform[33].width := 550;
|
||||||
|
Panel1 := TPanel.Create (Form1);
|
||||||
|
with Panel1 do
|
||||||
|
begin
|
||||||
|
Parent := BenchForm[33];
|
||||||
|
PanelNormClick (self);
|
||||||
|
end;
|
||||||
|
Panel2 := TPanel.Create (Form1);
|
||||||
|
with Panel2 do
|
||||||
|
begin
|
||||||
|
Parent := BenchForm[33];
|
||||||
|
Align := alBottom;
|
||||||
|
Height := 150;
|
||||||
|
Ctl3D := False;
|
||||||
|
Caption := 'Panel1';
|
||||||
|
Visible := True;
|
||||||
|
end;
|
||||||
//++++++++++++++++++++++++++++++++++++ PopupMenu1 +++++++++++++++++++++++++++++++++++
|
//++++++++++++++++++++++++++++++++++++ PopupMenu1 +++++++++++++++++++++++++++++++++++
|
||||||
Hello := TMenuItem.Create(PopupMenu1);
|
Hello := TMenuItem.Create(PopupMenu1);
|
||||||
Hello.Caption := 'Hello';
|
Hello.Caption := 'Hello';
|
||||||
@ -2540,6 +2566,9 @@ END.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.7 2002/03/23 21:02:02 lazarus
|
||||||
|
+ Enhanced testall-app with demo for TPanel, stoppok
|
||||||
|
|
||||||
Revision 1.6 2002/02/03 00:24:00 lazarus
|
Revision 1.6 2002/02/03 00:24:00 lazarus
|
||||||
TPanel implemented.
|
TPanel implemented.
|
||||||
Basic graphic primitives split into GraphType package, so that we can
|
Basic graphic primitives split into GraphType package, so that we can
|
||||||
|
@ -1125,7 +1125,78 @@ btnOpen := TBitBtn.Create(Self); //Button Open
|
|||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
//+++++++++++++++++++++++++++++++++++ TPanel Tools ++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++ TPanel Tools ++++++++++++++++++++++++++++++++++
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
// ADD Panel CompTools HERE !!!!!!!!!
|
|
||||||
|
rgPanelOutBevel := TRadioGroup.Create (self);
|
||||||
|
with rgPanelOutBevel do
|
||||||
|
begin
|
||||||
|
Parent := Panel2;
|
||||||
|
OnClick := @PanelOutBevelClick;
|
||||||
|
Top := 10;
|
||||||
|
Left := 250;
|
||||||
|
Height := 100;
|
||||||
|
Width := 100;
|
||||||
|
Items.Add ('lowered');
|
||||||
|
Items.Add ('raised');
|
||||||
|
Items.Add ('none');
|
||||||
|
Items.Add ('(!)space');
|
||||||
|
Hint := 'Change style (lowered/raised..)';
|
||||||
|
ShowHint := True;
|
||||||
|
ItemIndex := 1;
|
||||||
|
Show;
|
||||||
|
Caption := 'Outer-Bevel';
|
||||||
|
End;
|
||||||
|
rgPanelInBevel := TRadioGroup.Create (self);
|
||||||
|
with rgPanelInBevel do
|
||||||
|
begin
|
||||||
|
Parent := Panel2;
|
||||||
|
OnClick := @PanelInBevelClick;
|
||||||
|
Top := 10;
|
||||||
|
Left := 140;
|
||||||
|
Height := 100;
|
||||||
|
Width := 100;
|
||||||
|
Items.Add ('lowered');
|
||||||
|
Items.Add ('raised');
|
||||||
|
Items.Add ('none');
|
||||||
|
Items.Add ('(!)space');
|
||||||
|
Hint := 'Change style (lowered/raised..)';
|
||||||
|
ShowHint := True;
|
||||||
|
ItemIndex := 2;
|
||||||
|
Show;
|
||||||
|
Caption := 'Inner-Bevel';
|
||||||
|
End;
|
||||||
|
rgPanelAlign := TRadioGroup.Create (self);
|
||||||
|
with rgPanelAlign do
|
||||||
|
begin
|
||||||
|
Parent := Panel2;
|
||||||
|
OnClick := @PanelAlignClick;
|
||||||
|
top := 10;
|
||||||
|
left := 10;
|
||||||
|
Height := 130;
|
||||||
|
Width := 120;
|
||||||
|
Items.Add ('alNone');
|
||||||
|
Items.Add ('alBottom');
|
||||||
|
Items.Add ('alClient');
|
||||||
|
Items.Add ('alLeft');
|
||||||
|
Items.Add ('alRight');
|
||||||
|
Items.Add ('alTop');
|
||||||
|
ItemIndex := 0;
|
||||||
|
Show;
|
||||||
|
Caption := 'Alignment';
|
||||||
|
end;
|
||||||
|
btPanelNorm := TButton.Create(self);
|
||||||
|
with btPanelNorm do
|
||||||
|
begin
|
||||||
|
Parent := Panel2;
|
||||||
|
OnClick:= @PanelNormClick;
|
||||||
|
top := 10;
|
||||||
|
left := 360;
|
||||||
|
Height := 30;
|
||||||
|
Width := 50;
|
||||||
|
Show;
|
||||||
|
Caption := 'Norm';
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
//+++++++++++++++++++++++++++++++++++ TPopupMenu Tools ++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++ TPopupMenu Tools ++++++++++++++++++++++++++++++
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -2080,6 +2151,66 @@ begin
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
//++++++++++++++++++++++++++++++++ TPanel +++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
procedure TForm1.PanelInBevelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
case rgPanelInBevel.ItemIndex of
|
||||||
|
0 : Panel1.BevelInner := bvLowered;
|
||||||
|
1 : Panel1.BevelInner := bvRaised;
|
||||||
|
2 : Panel1.BevelInner := bvNone;
|
||||||
|
3 : Panel1.BevelInner := bvNone;
|
||||||
|
else
|
||||||
|
Panel1.BevelInner := bvNone;
|
||||||
|
end;
|
||||||
|
Panel1.Show;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.PanelOutBevelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
case rgPanelInBevel.ItemIndex of
|
||||||
|
0 : Panel1.BevelOuter := bvLowered;
|
||||||
|
1 : Panel1.BevelOuter := bvRaised;
|
||||||
|
2 : Panel1.BevelOuter := bvNone;
|
||||||
|
3 : Panel1.BevelOuter := bvNone;
|
||||||
|
else
|
||||||
|
Panel1.BevelOuter := bvNone;
|
||||||
|
end;
|
||||||
|
Panel1.Show;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.PanelAlignClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
case rgPanelAlign.ItemIndex of
|
||||||
|
0 : Panel1.Align := alNone;
|
||||||
|
1 : Panel1.Align := alBottom;
|
||||||
|
2 : Panel1.Align := alClient;
|
||||||
|
3 : Panel1.Align := alLeft;
|
||||||
|
4 : Panel1.Align := alRight;
|
||||||
|
5 : Panel1.Align := alTop;
|
||||||
|
else
|
||||||
|
Panel1.Align := alNone;
|
||||||
|
end;
|
||||||
|
Panel1.Show;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.PanelNormClick(Sender:TObject);
|
||||||
|
begin
|
||||||
|
with Panel1 do
|
||||||
|
begin
|
||||||
|
Left := 10;
|
||||||
|
Top := 10;
|
||||||
|
Width := 300;
|
||||||
|
Height := 100;
|
||||||
|
Ctl3D := False;
|
||||||
|
Caption := 'Panel1';
|
||||||
|
Visible := True;
|
||||||
|
Align := alNone;
|
||||||
|
BevelOuter := bvRaised;
|
||||||
|
BevelInner := bvNone;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
//++++++++++++++++++++++++++++++++ TBevel +++++++++++++++++++++++++++++++++++++++++++
|
||||||
procedure TForm1.BevelSettings(Sender : TObject);
|
procedure TForm1.BevelSettings(Sender : TObject);
|
||||||
begin
|
begin
|
||||||
case chbBevelShape.ItemIndex of
|
case chbBevelShape.ItemIndex of
|
||||||
@ -2602,6 +2733,12 @@ begin
|
|||||||
EventForm.Caption := EventForm.Caption+' TPaintBox';
|
EventForm.Caption := EventForm.Caption+' TPaintBox';
|
||||||
Assert(False, 'Trace: >>> TPaintBox TEST');
|
Assert(False, 'Trace: >>> TPaintBox TEST');
|
||||||
end;
|
end;
|
||||||
|
if Sender=TPan then
|
||||||
|
begin
|
||||||
|
BenchForm[33].Show;
|
||||||
|
EventForm.Caption := EventForm.Caption+' TPanel';
|
||||||
|
Assert(False, 'Trace: >>> TPanel TEST');
|
||||||
|
end;
|
||||||
If Sender=TPop then
|
If Sender=TPop then
|
||||||
begin
|
begin
|
||||||
BenchForm[34].Show;
|
BenchForm[34].Show;
|
||||||
@ -2723,6 +2860,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.6 2002/03/23 21:02:02 lazarus
|
||||||
|
+ Enhanced testall-app with demo for TPanel, stoppok
|
||||||
|
|
||||||
Revision 1.5 2001/04/17 21:36:15 lazarus
|
Revision 1.5 2001/04/17 21:36:15 lazarus
|
||||||
* enhanced testdialog for TBevel
|
* enhanced testdialog for TBevel
|
||||||
* basic test for TPaintBox
|
* basic test for TPaintBox
|
||||||
|
Loading…
Reference in New Issue
Block a user