FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Richtext
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Richtext
Posted: Thu Jul 20, 2006 02:34 AM

Antonio /Everyone;

Hi.

Does the method GetLineFromChar( nChar ) on the richtext class returns the position of the given nchar in centemeters or inches or what?

It does not seem to be working properly. Does anybody know?

Best,

Reinaldo.

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Richtext
Posted: Thu Jul 20, 2006 07:47 AM
From the MSDN:

This message returns the zero-based index of the line.


EMG
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Richtext
Posted: Thu Aug 03, 2006 07:51 PM
Enrico;

Then what I need is to find out where on the page did that last line printed vertically. This is so that I can go on printing other stuff on the next line after that.

So if I print with:
	nFrom := REPrintBox( oRtf:hWnd, ::oPrn:hDCOut, .t., nTop, nLeft, nBottom, nRight, nFrom )


Then with:
	oRtf:GetLineFromChar( nFrom )

I know the last line from the richtext that printed. But how can I find out where in inches or centemeters on the page did it print?

RC.
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Richtext
Posted: Fri Aug 04, 2006 04:20 PM
Enrico;

I sort of have a solution:
::nLastLine := ( ( aoRtf[i]:GetLineFromChar( nFrom ) - nTmp ) * ::oprn:Pix2Inch( aortf[i]:oFont:nHEIGHT, 0 )[1] ) + nTOPOffset

::nlastline += 0.32		//couple of blank lines


Where nTmp is the line index into the richtext that printed at the first line of the page.

It seems to be working...

RC.

Continue the discussion