FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index EasyReport, EasyDialog y EasyPreview Colocar Negrilla en mitad del texto
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Colocar Negrilla en mitad del texto
Posted: Sun Jul 26, 2015 10:19 AM

The problem we face there is that Windows TextOut() is used to paint the text and that function does not support such formatting.

Yesterday I thought about painting twice, first in bold then again in no bold, but the bold parts should be turned into spaces
and that will not properly fit in the exact place.

Thats why I finally realized that we can use another bold item placed on top of the text we want to be bold.

Not sure if the final result will be fine. But I think it could be a valid solution.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Colocar Negrilla en mitad del texto
Posted: Sun Jul 26, 2015 09:07 PM

Dear Antonio,
can you please help to Change this pseudocode

if isrtf( cText )
oRTF:print
else
TextOut( ::oPrn:hDCOut, nRow, nCol, cText )
endif

in valid FW code.
Thanks in advance
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Colocar Negrilla en mitad del texto
Posted: Mon Jul 27, 2015 08:20 AM

Dear Otto,

The problem is in this line:

oRTF:Print()

We need to create a TRichEdit() object there and keep it hidden and then destroy it.

And function RePrint() used from Class TRichEdit needs to be modified.

Do you also have the same need as Leandro ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Colocar Negrilla en mitad del texto
Posted: Mon Jul 27, 2015 07:51 PM

Dear Antonio,

I think this would be a great extension to EasyReport.

I tried to modify the paint method of Flatbutton class to use RichText.
This would offer great graphical opportunities.
But I have no idea how painting speed would be.

Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Colocar Negrilla en mitad del texto
Posted: Fri Jul 31, 2015 12:05 PM
Otto,

I am reviewing similar questions in StackOverflow:

http://stackoverflow.com/search?q=paint+rich+text

Its not easy as Windows does not provide a way to do it.

I think that a possible solution would be to let a RichEdit control paint it and then copying its image as a bitmap.

Thinking about it...
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion