>I prefer to show selection highlight using current OS (Widgetset)
settings 
>like most browsers actually do.

Isn't TBitMap CopyMode and CopyRect compatible to current OS settings?

>This is already implemented.

Where is this implementation available?


Panagiotis

-----Original Message-----
From: Jesus Reyes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 26, 2006 3:25 PM
To: lazarus@miraclec.com
Subject: Re: [lazarus] Turbopower IPro problem - selecting text in
HtmlPanel



----- Original Message ----- 
From: "Panagiotis Sidiropoulos" <[EMAIL PROTECTED]>
To: <lazarus@miraclec.com>
Sent: Wednesday, January 25, 2006 5:22 PM
Subject: Re: [lazarus] Turbopower IPro problem - selecting text in
HtmlPanel


> 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.
> 
> 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?
> 

At some point I also had inverted selection working (I was using
horizontal XOR lines tought) but didn't like it, I prefer to show
selection highlight using current OS (Widgetset) settings like most
browsers actually do. This is already implemented. If you want inverted
selection maybe you can wrap the code in IFDEF's agains current version
but I would prefer not inverted selection by default. 

Jesus Reyes A.


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.com.mx/ 

_________________________________________________________________
     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