uses PrintersDlgs;procedure TForm1.FormCreate(Sender: TObject);begin IpHtmlPanel1.OpenURL(ExtractFilePath(ParamStr(0)) + 'test.html');end;procedure TForm1.Button1Click(Sender: TObject);begin IpHtmlPanel1.PrintPreview;end;
(...)uses {$IFDEF IP_LAZARUS} LCLType, GraphType, LCLIntf, Buttons, LResources, <<-- This(...)...(...)implementationuses Printers;{$IFNDEF IP_LAZARUS} -|{$R *.DFM} -|-- This{$ENDIF} -|(...)...(...)procedure TIpHTMLPreview.FormResize(Sender: TObject);begin if OwnerPanel<>nil then SetZoom(Zoom); {force recalc of preview sizes}end;initialization {$I iphtmlpv.lrs} <<-- Thisend.(...)
unit IpHtmlPv;interfaceuses {$IFDEF IP_LAZARUS} LCLType, GraphType, LCLIntf, Buttons, LResources, {$ELSE} Windows, {$ENDIF}
procedure ApplyProps;(...) var Changed : Boolean;(* {$IFDEF IP_LAZARUS} TextMetrics : TLCLTextMetric; {$ELSE}*) TextMetrics : TTextMetric;// {$ENDIF}(...)
(...) PropA.SetKnownSizeOfSpace(SizeOfSpace); PropA.KnownSizeOfHyphen := SizeOfHyphen; end; if Changed then begin if PropA.tmHeight = 0 then begin(* {$IFDEF IP_LAZARUS} aCanvas.GetTextMetrics(TextMetrics); PropA.tmAscent := TextMetrics.Ascender; PropA.tmDescent := TextMetrics.Descender; PropA.tmHeight := TextMetrics.Height; {$ELSE}*) GetTextMetrics(aCanvas.Handle, TextMetrics); PropA.tmAscent := TextMetrics.tmAscent; PropA.tmDescent := TextMetrics.tmDescent; PropA.tmHeight := TextMetrics.tmHeight;// {$ENDIF} end;(...)
Hi Jesusr is that lazarus release 24419 or turbopower release 24419 ?, (sorry if it seems a silly question).RegardsDavePS I Use the CodeTyphon Version and it has no SVN number: their release date 2010-6-3
I tried to compile and gave error by the absence of TLCLTextMetric type. I commented the lines that gave error, e.g:...And just so I could build, but the error persists:http://imagebin.org/916761144 empty pages (my page is only 1).
/usr/lib/lazarus/lcl/graphics.pp(1035,14) Error: There is no method in an ancestor class to be overridden: "TCanvas.GetClipping:Boolean;"/usr/lib/lazarus/lcl/graphics.pp(1036,15) Error: There is no method in an ancestor class to be overridden: "TCanvas.SetClipping(const Boolean);"/usr/lib/lazarus/lcl/graphics.pp(1612,85) Error: Identifier not found "TFPResourceHandle"/usr/lib/lazarus/lcl/graphics.pp(1882,1) Fatal: There were 3 errors compiling module, stopping