AngelicTech / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
1 stars 1 forks source link

Question #406

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Prompt:
Assume there is a line

12345 12345 12345 12345 12345 12345 12345 <br>
12345 12345 <br>

if the width HTMLViewer longer than the string, then see the two lines of text. 
If the width HTMLViewer small, the screen can be seen:

12345 12345 12345 12345 12345 12345
12345
12345 12345

Prompt, whether it is possible to determine the length of a string is displayed 
in HTMLViewer without tags?

Thank U.

Original issue reported on code.google.com by SchwarzK...@yandex.ru on 14 Mar 2015 at 4:13

GoogleCodeExporter commented 9 years ago
No, there is no (easy) way. You can try to locate the TSection, that contains 
the Text. Then you must find the corresponding FontObject and which characters 
to show/print with it. THtmlViewer does all theses things and lets Windows 
calculate the widths of the strings and AFAIR stores the sizes for internal 
further use. But I think it is too complicated to use outside THtmlViewer.

Original comment by OrphanCat on 18 May 2015 at 8:42