B4A Library RtfLabel

Hi everyone! With library RtfLabel text can be formatted and displayed scrollable (short to medium length texts).

The following additional libraries are needed: RichString, Reflection, StringUtils, Clipboard (optional).

Text formatting: Bold, italic, colored, smaller font size, hyperlinks, anchors.

Paragraph formatting: Text indent left / right, first line indent, bullet character, centering, text size, colored background, images centered or with body text.

Text verification: The Lib has a function for checking the text on formatting errors. Faulty paragraphs are indicated in the label itself with appropriate references (intended for the development time).

Select text by user: If the function is provided the user can select text (automatically by word) and copy. To extend the selection over the visible area, the marking on the top or bottom line must be held - the text is then scrolled automatically.

Restoration of text position: When changing the orientation, the text will appear again at about the position as before - whichever is the beginning of the text of the first fully visible row.

A detailed documentation is located in the project subfolder "Help ...".

Best regards
Petrus
 

Attachments

  • example01e.png
    example01e.png
    28.8 KB · Views: 603
  • example02e.png
    example02e.png
    35.1 KB · Views: 597
  • example03e.png
    example03e.png
    30.9 KB · Views: 511
  • example04e.png
    example04e.png
    60.2 KB · Views: 529
  • example05e.png
    example05e.png
    23.7 KB · Views: 497
  • RtfLabelExample_v_1_01.zip
    393.5 KB · Views: 598

Petrus

Member
Licensed User
Longtime User
New version 1.01
This update fixes a bug in "RtfLabel.Initialize" - the left and the top position was disregarded.

Best regards
Petrus
 

Informatix

Expert
Licensed User
Longtime User
This library is unable to interpret the Rich Text Format (RTF) and its tags have nothing to do with the RTF ones, so why did you call it RtfLabel? It's better when the cover matches the inside. Apart this minor criticism, I like it. Thank you!
 

mahdirj2013

New Member
Licensed User
Longtime User
I have a request for tips on Rtflabel Library.
Take advantage of this Library in Arabic or Farsi there?
Please advise if there is.
 

Discorez

Member
Licensed User
Longtime User
Nice lib, thanks!
I need to set the background color of certain words (without 'mark' mode). It's possible?

And more.
If the selection mode is active, the color zone moves to the right on the next word.
Tested on the emulator.
Bilderman 2014.06.01 12-55-43.png
 

Petrus

Member
Licensed User
Longtime User
1.) Setting the background color for individual words is not possible.

2.) For the calculation of the position of text, the function "Canvas.MeasureStringWidth" is used. These are for different devices return incorrect values. See also here. I know no solution to the problem o_O.

Best regards
Petrus
 

Kapelis

Member
Licensed User
Longtime User
i can't download the zip file, it only arrives at 245 Kb and stops download :-(

OK, done... it was a browser problem, thanks for this library :)
 
Top