GridPrinter: Check whether printers are installed also for Preview.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9186 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
9cb6e4ae53
commit
e3cba0674d
@ -62,7 +62,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
Graphics, Controls, LCLIntf, LCLType;
|
||||
Graphics, Controls, LCLIntf, LCLType, Printers;
|
||||
|
||||
{ TGridPrintPreviewFormParams }
|
||||
|
||||
@ -126,6 +126,9 @@ begin
|
||||
if FGridPrinter = nil then
|
||||
exit;
|
||||
|
||||
if Printer.Printers.Count = 0 then
|
||||
raise EPrinter.Create('No printers defined.');
|
||||
|
||||
F := TGridPrintPreviewForm.Create(nil);
|
||||
try
|
||||
F.GridPrinter := FGridPrinter;
|
||||
|
@ -6,16 +6,17 @@ object GridPrintPreviewForm: TGridPrintPreviewForm
|
||||
Caption = 'Print Preview'
|
||||
ClientHeight = 649
|
||||
ClientWidth = 901
|
||||
OnActivate = FormActivate
|
||||
Position = poMainFormCenter
|
||||
ShowHint = True
|
||||
LCLVersion = '2.3.0.0'
|
||||
LCLVersion = '3.99.0.0'
|
||||
OnActivate = FormActivate
|
||||
object ToolBar: TToolBar
|
||||
Left = 0
|
||||
Left = 2
|
||||
Height = 26
|
||||
Top = 0
|
||||
Width = 901
|
||||
Top = 2
|
||||
Width = 897
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 2
|
||||
ButtonHeight = 26
|
||||
ButtonWidth = 28
|
||||
Caption = 'ToolBar'
|
||||
@ -242,11 +243,11 @@ object GridPrintPreviewForm: TGridPrintPreviewForm
|
||||
Width = 40
|
||||
Alignment = taCenter
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
TabOrder = 0
|
||||
Text = 'edPageNumber'
|
||||
OnEditingDone = edPageNumberEditingDone
|
||||
OnKeyDown = edPageNumberKeyDown
|
||||
OnMouseWheel = edPageNumberMouseWheel
|
||||
TabOrder = 0
|
||||
Text = 'edPageNumber'
|
||||
end
|
||||
end
|
||||
object tbScalePrinter: TToolButton
|
||||
@ -258,15 +259,15 @@ object GridPrintPreviewForm: TGridPrintPreviewForm
|
||||
end
|
||||
object ScrollBox: TScrollBox
|
||||
Left = 0
|
||||
Height = 623
|
||||
Top = 26
|
||||
Height = 619
|
||||
Top = 30
|
||||
Width = 901
|
||||
HorzScrollBar.Page = 98
|
||||
HorzScrollBar.Tracking = True
|
||||
VertScrollBar.Page = 98
|
||||
VertScrollBar.Tracking = True
|
||||
Align = alClient
|
||||
ClientHeight = 619
|
||||
ClientHeight = 615
|
||||
ClientWidth = 897
|
||||
Color = clAppWorkspace
|
||||
ParentBackground = False
|
||||
|
Loading…
Reference in New Issue
Block a user