tvplanit: Make properties Achors, BorderSpacing and ChildSizing available for TVpResourceCombob and TVpPrintFormatCombobox. Improved, high-dpi aware layout of print preview form.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5076 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-08-05 22:34:24 +00:00
parent 0e25976581
commit 82f445a910
4 changed files with 78 additions and 36 deletions

View File

@ -159,6 +159,10 @@ type
constructor Create (AOwner : TComponent); override;
destructor Destroy; override;
{$IFDEF LCL}
property ChildSizing;
{$ENDIF}
published
property DataStore : TVpCustomDataStore
read FDataStore write SetDataStore;
@ -167,10 +171,14 @@ type
default ruOnChange;
property Version : string
read GetAbout write SetAbout stored False;
property Align;
property Anchors;
property Constraints;
property Style;
{$IFDEF LCL}
property Borderspacing;
{$ENDIF}
end;

View File

@ -67,11 +67,19 @@ type
procedure UpdateItems;
property Style;
{$IFDEF LCL}
property ChildSizing;
{$ENDIF}
published
property Version: string read GetAbout write SetAbout stored False;
property ControlLink: TVpControlLink read FControlLink write SetControlLink;
property Align;
property Anchors;
{$IFDEF LCL}
property Borderspacing;
{$ENDIF}
property Cursor;
property DragCursor;
property DragMode;

View File

@ -17,42 +17,14 @@ object frmPrintPreview: TfrmPrintPreview
LCLVersion = '1.7'
object Panel1: TPanel
Left = 0
Height = 62
Height = 58
Top = 0
Width = 540
Align = alTop
ClientHeight = 62
AutoSize = True
ClientHeight = 58
ClientWidth = 540
TabOrder = 0
object cboxZoom: TComboBox
Left = 296
Height = 23
Top = 32
Width = 145
ItemHeight = 15
Items.Strings = (
'Fit to Control'
'Actual Size'
'25%'
'33%'
'50%'
'67%'
'75%'
)
OnChange = cboxZoomChange
Style = csDropDownList
TabOrder = 2
end
object VpPrintFormatComboBox1: TVpPrintFormatComboBox
Left = 8
Height = 23
Top = 32
Width = 280
ItemHeight = 15
Sorted = True
TabOrder = 1
OnChange = VpPrintFormatComboBox1Change
end
object ToolBar1: TToolBar
Left = 1
Height = 27
@ -122,11 +94,62 @@ object frmPrintPreview: TfrmPrintPreview
Action = actCancel
end
end
object Panel2: TPanel
Left = 1
Height = 29
Top = 28
Width = 538
Align = alTop
AutoSize = True
BevelOuter = bvNone
ClientHeight = 29
ClientWidth = 538
TabOrder = 1
object cboxZoom: TComboBox
Left = 389
Height = 23
Top = 2
Width = 145
Align = alRight
BorderSpacing.Top = 2
BorderSpacing.Right = 4
BorderSpacing.Bottom = 4
ItemHeight = 15
Items.Strings = (
'Fit to Control'
'Actual Size'
'25%'
'33%'
'50%'
'67%'
'75%'
)
OnChange = cboxZoomChange
Style = csDropDownList
TabOrder = 0
end
object VpPrintFormatComboBox1: TVpPrintFormatComboBox
AnchorSideRight.Control = cboxZoom
Left = 4
Height = 23
Top = 2
Width = 381
Anchors = [akTop, akLeft, akRight]
Borderspacing.Left = 4
Borderspacing.Top = 2
Borderspacing.Right = 4
Borderspacing.Bottom = 2
ItemHeight = 15
Sorted = True
TabOrder = 1
OnChange = VpPrintFormatComboBox1Change
end
end
end
object VpPrintPreview1: TVpPrintPreview
Left = 0
Height = 756
Top = 62
Height = 760
Top = 58
Width = 540
CurPage = 0
EndDate = 37355.4526088079

View File

@ -50,9 +50,11 @@ type
{ TfrmPrintPreview }
TfrmPrintPreview = class(TForm)
Bevel1: TBevel;
Panel1: TPanel;
cboxZoom: TComboBox;
btnCancel: TToolButton;
Panel2: TPanel;
VpPrintPreview1: TVpPrintPreview;
VpPrintFormatComboBox1: TVpPrintFormatComboBox;
ToolBar1: TToolBar;
@ -170,6 +172,7 @@ procedure TfrmPrintPreview.FormCreate(Sender: TObject);
begin
ReturnCode := rtAbandon;
SetCaptions;
Toolbar1.ButtonHeight := ScaleY(Toolbar1.ButtonHeight, DesignTimeDPI);
end;
procedure TfrmPrintPreview.SetCaptions;
@ -422,7 +425,7 @@ var
begin
if VpPrintPreview1.ControlLink = nil then
exit;
(*
cnv := TControlCanvas.Create;
try
cnv.Control := VpPrintFormatCombobox1;
@ -437,7 +440,7 @@ begin
finally
cnv.Free;
end;
end;*)
end;
end.