ISO: Someone to demonstrate the Input Fields TEXT option

Discussion and announcements related to the BRGroup and ADS conferences.

Moderators: Susan Smith, admin, Gabriel

Post Reply
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

ISO: Someone to demonstrate the Input Fields TEXT option

Post by Susan Smith »

Would someone like to demonstrate the new TEXT option for INPUT FIELDS statements? It creates lovely multi-line text boxes that wrap nicely. The BR 4.3 release, displayed below, include a sample program to get you started. I'm attached a screenshot of the results of that sample program. This should be a short and very simple presentation...nothing elaborate. And if you're already using this feature in your screens, a demonstration would be great!

Contact me!

-- Susan


NEW TEXT FIELD FORMAT

10 (R)INPUT FIELDS “row, col, TEXT rows/cols[/capacity], leading-attr, …”:

This format is similar to the C/V/G format with the ^ENTER_LF attribute except:
No trailing space padding or trimming occurs.
Rows and columns are specified.
Field capacity or newlines can cause a vertical scrollbar to appear.

Supported leading attributes are ^ENTER_LF (the default), ^ENTER_CRLF and ^NOWRAP.
The TEXT keyword will imply ^ENTER_LF unless ^ENTER_CRLF is specified.

^ENTER_LF (the default) causes the ENTER key to add LF characters to the data and to go to a new line left justified. The cursor will retrace the data when backspace or left-arrow is keyed, meaning the on-screen LF characters are represented by moving the cursor, instead of allowing it to rest on invisible LF characters.

^ENTER_CRLF may be specified in lieu of ^ENTER_LF. When that is the case, carriage returns entered are represented in the data as carriage-return-linefeed (CRLF) character pairs. ^NOWRAP may be specified to suppress word wrapping. When ^NOWRAP is active, data is entered on the current line until ENTER is keyed to go to the next line. Both horizontal and vertical scroll bars appear as needed.

Tabs are entered into the text. Shift-tab is ignored.

Home, End and the arrow keys all operate relative to the current line as opposed to operating on the text box as a whole.

Depressing the Control key causes the following keys to operate in the normal string entry mode:

• Enter – Returns control to the BR program
• Tab – Goes to the next control
• Shift-Tab – Goes to the prior control
• Home – Goes to the beginning of data or the first field
• End – Goes to the end of data or the last field
• Left-Arrow/Up-Arrow – Goes to the prior control
• Right-Arrow/Down-Arrow – Goes to the next control

A new system function is defined called CURPOS. This returns the position of the cursor within the data when control is returned to the program. This does not include end-of-line spaces that have not been entered, but does include invisible CRLF characters.

A sample program to demonstrate TEXT entry is:
01000 ! Rep Text
01020 ! Test New Text Fiueld Type
01040 dim TEXT$*300, TEXT$(1)*40
01060 print NEWPAGE
01080 rinput fields "3,10,text 4/40/300,uh": TEXT$
01100 print fields "10,10,c": TEXT$
01120 print TEXT$
01140 let STR2MAT(TEXT$, MAT TEXT$, CHR$(10))
01160 print MAT TEXT$
Attachments
This is the screenshot of what the text box looks like
This is the screenshot of what the text box looks like
TEXT_Entry.jpg (23.16 KiB) Viewed 3301 times
Post Reply