mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 16:50:27 +02:00
LazReport, improved layout on band type selection
git-svn-id: trunk@27454 -
This commit is contained in:
parent
cd506ebd5a
commit
015906b019
@ -1,32 +1,45 @@
|
||||
object frBandTypesForm: TfrBandTypesForm
|
||||
Left = 426
|
||||
Left = 374
|
||||
Height = 361
|
||||
Top = 172
|
||||
Width = 377
|
||||
Top = 112
|
||||
Width = 422
|
||||
HorzScrollBar.Page = 335
|
||||
VertScrollBar.Page = 357
|
||||
ActiveControl = ButtonPanel1
|
||||
AutoSize = True
|
||||
BorderIcons = []
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Insert new band'
|
||||
ClientHeight = 361
|
||||
ClientWidth = 377
|
||||
ClientWidth = 422
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
OnShow = FormShow
|
||||
Position = poOwnerFormCenter
|
||||
LCLVersion = '0.9.29'
|
||||
object GB1: TGroupBox
|
||||
Left = 0
|
||||
Height = 311
|
||||
Top = 0
|
||||
Width = 377
|
||||
Width = 422
|
||||
HelpContext = 89
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
Caption = 'Band type'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.HorizontalSpacing = 3
|
||||
ChildSizing.VerticalSpacing = 3
|
||||
ChildSizing.EnlargeVertical = crsHomogenousSpaceResize
|
||||
ChildSizing.ShrinkVertical = crsHomogenousSpaceResize
|
||||
ChildSizing.Layout = cclTopToBottomThenLeftToRight
|
||||
ChildSizing.ControlsPerLine = 11
|
||||
TabOrder = 0
|
||||
end
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 38
|
||||
Top = 317
|
||||
Width = 365
|
||||
Width = 410
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.Caption = '&OK'
|
||||
HelpButton.Name = 'HelpButton'
|
||||
|
@ -29,9 +29,11 @@ type
|
||||
ButtonPanel1: TButtonPanel;
|
||||
GB1: TGroupBox;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure bClick(Sender: TObject);
|
||||
procedure CreateOptions;
|
||||
public
|
||||
{ Public declarations }
|
||||
SelectedTyp: TfrBandType;
|
||||
@ -48,6 +50,21 @@ uses LR_Desgn;
|
||||
|
||||
|
||||
procedure TfrBandTypesForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
CreateOptions;
|
||||
end;
|
||||
|
||||
procedure TfrBandTypesForm.FormShow(Sender: TObject);
|
||||
begin
|
||||
//CreateOptions;
|
||||
end;
|
||||
|
||||
procedure TfrBandTypesForm.bClick(Sender: TObject);
|
||||
begin
|
||||
SelectedTyp := TfrBandType((Sender as TComponent).Tag);
|
||||
end;
|
||||
|
||||
procedure TfrBandTypesForm.CreateOptions;
|
||||
var
|
||||
b : TRadioButton;
|
||||
bt : TfrBandType;
|
||||
@ -59,25 +76,11 @@ begin
|
||||
b := TRadioButton.Create(GB1);
|
||||
b.Parent := GB1;
|
||||
b.AutoSize:=True;
|
||||
|
||||
if Integer(bt) > 10 then
|
||||
begin
|
||||
b.Left := 160;
|
||||
b.Top := (Integer(bt) - 11) * 20 + 20;
|
||||
end
|
||||
else
|
||||
begin
|
||||
b.Left := 8;
|
||||
b.Top := Integer(bt) * 20 + 20;
|
||||
end;
|
||||
|
||||
b.Tag := Integer(bt);
|
||||
b.Caption := frBandNames[Bt];
|
||||
b.Width := 140;
|
||||
b.OnClick := @bClick;
|
||||
b.Enabled := (bt in [btMasterHeader..btSubDetailFooter,
|
||||
btGroupHeader, btGroupFooter]) or not frCheckBand(bt);
|
||||
b.AdjustSize;
|
||||
if b.Enabled and First then
|
||||
begin
|
||||
b.Checked := True;
|
||||
@ -85,15 +88,10 @@ begin
|
||||
First := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Caption := sBandTypesFormCapt;
|
||||
GB1.Caption := sBandTypesFormBType;
|
||||
end;
|
||||
|
||||
procedure TfrBandTypesForm.bClick(Sender: TObject);
|
||||
begin
|
||||
SelectedTyp := TfrBandType((Sender as TComponent).Tag);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user