Page 2 of 2

Re: Colocar Negrilla en mitad del texto

PostPosted: Sun Jul 26, 2015 10:19 am
by Antonio Linares
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.

Re: Colocar Negrilla en mitad del texto

PostPosted: Sun Jul 26, 2015 9:07 pm
by Otto
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

Re: Colocar Negrilla en mitad del texto

PostPosted: Mon Jul 27, 2015 8:20 am
by Antonio Linares
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 ?

Re: Colocar Negrilla en mitad del texto

PostPosted: Mon Jul 27, 2015 7:51 pm
by Otto
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

Re: Colocar Negrilla en mitad del texto

PostPosted: Fri Jul 31, 2015 12:05 pm
by Antonio Linares
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...