User Tools

Site Tools


tplcontrolrtftoolbar.htm
Navigation:  Templates > Guide to all Templates > Control Templates >====== RTFToolBar Control Template ====== Previous pageReturn to chapter overviewNext page

This control template requires the population of the RTFTextControl Control Template.

The RTFToolBar Control Template populates a group of support controls to use with the RTFTextControl control template.

There are no template prompts for this control. You can disable or hide controls that you do not want to provide to the user. You can also modify the icons and text used on each support control.

Each control is described as follows:

rtf01.jpgNew Clears the contents of the RTF Control.
rtf02.jpgOpen Prompts you to load an external RTF file's contents into the RTF control
rtf03.jpgSave Allows you to save the existing RTF control's contents to an external file.
rtf04.jpgPrint Prints the RTF control contents.
rtf05.jpgFind Opens the Find dialog window, allowing you to search for text in the RTF control.
rtf06.jpgFind and Replace Opens the Find and Replace dialog window, allowing you to search and replace target text in the RTF control.
rtf07.jpgCut, Copy and Paste Performs the standard Windows cut, copy and paste actions for selected text in the RTF control.
rtf08.jpgUndo and Redo Allows you to undo the sequence of actions performed on an RTF control, and to redo those actions if needed.
rtf09.jpgTab Stops Press this button to access the Tabs dialog. Set your tab stops in millimeters, inches, or twips. The hotkey to move to the next tab stop is CTRL+TAB
rtf10.jpgParagraph Indents Press this button to access the Paragraph Indents dialog. Set the First line, Left side and Right side of the paragraph in millimeters, inches, or twips.
rtf11.jpgAlignment Controls These buttons provide the standard alignment features (left, right, center, and full justification) for the selected text.

NoteBox.jpg

Full justification is currently only supported in Rich Edit versions greater than 3.0. The presence of RichEdxx.DLL is required in the Windows System directory.

rtf13.jpg

Bullets and Numbering/Bullet Styles Add bullets or numbers and set the style with these buttons. Bullets and numbering can only be applied at the start of a paragraph.
rtf12.jpgFont and Colors These controls set all aspects of the active font and color to use in the RTF control.

blk2blue.jpg

Hiding or Removing Controls

If there are controls that you do not need in your application (Example: Save or Print), you can simply delete them. When you are prompted with “Do you want to delete this control template?” Press No, and only the individual control will be removed.

To conditionally hide controls at runtime, you can use the following embedded source in the Window Manager's Init Method (just after the first RTFControl Initialization embed point):

IF NeedToHideSave         !locally defined flag

   HIDE(?RTFToolSave)    !hide Save button

   RTFControl19.AddItem(RTFToolbar:CtlButtonSave,0)

   !the AddItem method disables Save button logic

END

Use this technique for any button that you need to conditionally display.

tplcontrolrtftoolbar.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1