On Thu, 26 Jan 2006 00:22:31 +0100
"Panagiotis Sidiropoulos" <[EMAIL PROTECTED]> wrote:

> I managed to display selected text as inverted by replacing
> 
>       // in ipHtml file, "procedure PaintSelection;".
>       {$IFDEF IP_LAZARUS}
>       writeln('TIpHtml.PaintSelection  PatBlt not implemented');
>       {$ELSE}
> 
> 
> with code that follows:
> 
>        {$IFDEF IP_LAZARUS}
>        BitMapToInvert := TBitMap.Create;
>        BitMapToInvert.Width := R.Right - R.Left;
>        BitMapToInvert.Height := R.Bottom - R.Top;
>        BitMapToInvert.Canvas.CopyMode := cmMergePaint;
>        BitMapToInvert.Canvas.CopyRect( Rect( 0, 0, BitMapToInvert.Width, 
> BitMapToInvert.Height ),
>                                        PaintBuffer,
>                                        R );
>        PaintBuffer.CopyRect( R,
>                              BitMapToInvert.Canvas,
>                              Rect( 0, 0, BitMapToInvert.Width, 
> BitMapToInvert.Height ) );
>        BitMapToInvert.Free;
>        {$ELSE}
> 
> You have first to declare a TBitMap named BitMapToInvert at
> .PaintSelection  var declarations:
>        BitMapToInvert: TBitMap;
> It is flickering but works fine inverting colors correctly.

Can you create a patch?
http://wiki.lazarus.freepascal.org/index.php/Creating_A_Patch


Mattias





> 
> What I'm still investigating is to make SelectAll method to work.
> Any ideas are welcomed.
> 
> Panagiotis
> 
> 
> From: Timothy Ha <timh <at> jesuschrist.ru>
> Subject: Turbopower IPro problem - selecting text in HtmlPanel
> Newsgroups: gmane.comp.ide.lazarus.general
> Date: 2005-11-10 22:46:25 GMT (10 weeks, 5 days, 23 hours and 17 minutes 
> ago)
> 
> I was reading Christian U. message at
> http://www.mail-archive.com/lazarus <at> miraclec.com/msg01959.html and 
> would
> like to know the progress of using Turbopower Ipro to read HTML files.
> 
> I could load a HTML into the HTML Panel, but got errors when tried to
> select a bit of text
> 
> IpHtml.pas about line 7827 I've got
> 
>       {$IFDEF IP_LAZARUS}
>       writeln('TIpHtml.PaintSelection  PatBlt not implemented');
>       {$ELSE}
> 
> As for loading text into HtmlPanel, this is what I did:
> 
> procedure TForm1.Button1Click(Sender: TObject);
> var
>   h: TIpHTML;
>   f: TFileStream;
> begin
>     h := TIpHTML.Create;
>     f := TFileStream.Create('d:\my.html', 0);
>     h.LoadFromStream(f);
>     IpHTMLPanel1.SetHtml(h);
> end;
> 
> How can I copy-paste text from Ipro HtmlPanel to other applications now?
> 
> 
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to