Colocar Negrilla en mitad del texto

Re: Colocar Negrilla en mitad del texto

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Colocar Negrilla en mitad del texto

Postby Otto » Sun Jul 26, 2015 9: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Colocar Negrilla en mitad del texto

Postby Antonio Linares » Mon Jul 27, 2015 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Colocar Negrilla en mitad del texto

Postby Otto » Mon Jul 27, 2015 7: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Colocar Negrilla en mitad del texto

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to EasyReport, EasyDialog y EasyPreview

Who is online

Users browsing this forum: No registered users and 1 guest

cron