Friday, May 09, 2008  



 FarPoint Technologies
 (800) 645-5913

 fpsales@fpoint.com

 FarPoint Europe (UK)
 +44 (0) 1798 812 372

 salesEurope@fpoint.com

     
 »Input Pro »Product Tour » fpMemo

Previous fpMemo Control Next

The fpMemo control can contain and display large amounts of text data, even amounts in excess of 64 kilobytes (65,536 characters). However, the number of characters the fpMemo control can hold is limited by the memory of the user's computer.

You can create an fpMemo control that reads text either as a large block or line by line, replacing the current text or appending it. You can display scroll bars for navigation and let text wrap within the control. You can also specify that the Tab key processes within the fpMemo control (allowing the user to create tabs), rather than moving the focus to the next control. The fpMemo control supports the IntelliMouse®.

Setting and Returning Text | Working with Lines of Text | Setting Tabs in the fpMemo Control | Displaying Scroll Bars | Loading and Saving Files

  Back to Top
 Setting and Returning Text
   You can provide blocks of text for the fpMemo control, or you can have data read into the control one line at a time. If you provide text blocks, you can add a single block of less than 64K or multiple blocks of up to 64K each. You can also limit the number of lines allowed in the fpMemo control. To return text from the fpMemo control, follow similar steps.

To provide a block of text (less than 64K)
    1. Set the TextMode property to 0 (Normal), the default value.
2. Provide a block of text by setting the Text property.

To provide multiple blocks of text (each less than 64K, but totaling more than 64K)
    1. Set the TextMode property to 1 (First).
2. Provide the first block of text by setting the Text property.
3. Set the TextMode property to 2 (Next).
4. Provide the next block of text by setting the Text property.
5. Provide subsequent blocks of text by repeating steps 3 and 4.

To provide text one line at a time
    1. Set the TextMode property to 3 (Line).
2. Set the LineIndex property to indicate which line receives the text.
3. Repeat steps 1 and 2 for as many lines of text as you want to add.
4. If you want to limit the number of lines allowed in the control, set the LineLimit property.

To return a block of text (less than 64K)
    1. Set the TextMode property to 0 (Normal).
2. Return the block of text using the Text property.

To return multiple blocks of text (each less than 64K, but totaling more than 64K)
    1. Set the TextMode property to 1 (First).
2. Return the first block of text using the Text property.
3. Set the TextMode property to 2 (Next).
4. Return the next block of text using the Text property.
5. Return subsequent blocks of text by repeating steps 3 and 4.

To return text one line at a time
    1. Set the TextMode property to 3 (Line).
2. Set the LineIndex property to indicate which line of text to return.
3. Repeat steps 1 and 2 for as many lines of text as you want to return.

 Back to Top
 Working with Lines of Text
   You can let lines of text wrap within the control and specify the length of the lines (or the page width). You can specify the maximum number of lines. In addition, the control can display end-of-line characters to indicate carriage returns and assist editing.

You can customize how selected text in lines is highlighted: selection highlighting can extend just to the end of the line of text, extend to the edge of the control, or include only entire lines (no partial lines). You can move the cursor to a specified line and you can make a specified line the top visible line in the control. You can also count the number of lines of text in the fpMemo control.

   * If you want the text to wrap within the control, set the WordWrap property to True.
* Specify the page width by setting the PageWidth property.
* Display end-of-line characters to indicate carriage returns by setting the ShowEOL property to True.
* If you want to specify the number of lines in the control, set the LineLimit property.
* Customize how selected text is highlighted by setting the SelMode property.
* To move the cursor to a specified line, at run time set the CurrentLine property.
* To make a specific line the top visible line in the control, at run time set the TopLine property.
* To count the number of lines of text in the control, at run time return the value of the LineCount property.

  Back to Top
 Setting Tabs in the fpMemo Control
   You can specify that the Tab key processes within the fpMemo control rather than moving the focus to the next control. You can specify the number of characters the cursor moves when the user presses the Tab key.

Tabs can be set by setting the ProcessTab property and the TabLength property.

  Back to Top
 Displaying Scroll Bars
   You can display horizontal and vertical scroll bars to help the user navigate through text. The scroll bars can be displayed all the time, or just when there is enough text so that the control cannot display all the text at once.

  Back to Top
 Loading and Saving Files
   The fpMemo control lets you load or save a text file. Users can load files up to the size accommodated by their system's memory.

To load files into the fpMemo control
     Call the MemoLoadFile function and set the File parameter to the path and file name of the text file to load into the control.

To save files from the fpMemo control
     Call the MemoSaveFile function and set the File parameter to the path and file name of the file to which to save the contents of the control.

Previous fpMemo Control Next

    
 Have a question?
Have a Question? Ask Us!
Subscribe to the RSS feed!RSS Subscribe
 

 
SD Times 'TOP 100' Industry Innovator - Read the press release (pdf)


Input Pro Tour
fpBoolean Control
fpCurrency Control
fpDateTime Control
fpDoubleSingle Control
fpLongInteger Control
fpMask Control
fpMemo Control
fpText Control
Rate this Tour

Copyright © 1991-2007 FarPoint Technologies, Inc. All rights reserved. All names are property of their respective owners.