Tags:
create new tag
view all tags

.TEXT SET TXT MAX SZ

This subroutine sets the maximum size (width and height) of the text that can be displayed in the "current" Text Object.


Usage:

      PASS         <max_text_width>           FIELD            SHARE? N
      PASS         <max_text_lines>           FIELD            SHARE? N
      GOSUB    0CD .TEXT SET TXT MAX SZ
      *        Check for error
      IF       0CD .TEXT SET TXT MAX SZ       NE


Description:

This subroutine sets the maximum size (width and height) of the text that can be displayed in the "current" Text Object. It will truncate the text if it exceeds the line count.

The parameters are optional, if blank or not passed they will be reset to their default value.

<max_text_width> is the maximum width of a line of text, in pixels. Allowed range is 1-99999.

<max_text_lines> is the maximum number of lines of text. Allowed range is 1-99.

The <max_text_width> parameter specifies the maximum width of the text box. If the text requires a longer width for display, it will be wrapped into multiple lines. However, if the number of lines exceed <max_text_lines>, the text will be truncated, with the last visible characters replaced with "...".

If <max_text_lines> is 1 (the default), the text will never be wrapped and will be truncated directly if it needs more than <max_text_width> for display.

See .TEXT SET TXT MAX SZ:W to set the width or .TEXT SET TXT MAX SZ:H to set the number of lines individually.

NOTE: You cannot set <max_text_lines> unless you also set <max_text_width>. If you do not set <max_text_width>, the setting for <max_text_lines> will be ignored.

Comments:

Read what other users have said about this page or add your own comments.


-- JeanNeron - 2011-11-18

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2012-02-22 - JeanNeron
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback