rte is a RTF-visualobjekt which can be activated and edited.
Using this you have to apply the resize-command.
(setvar=sys_resize=c or u)
//
All properties and functions are addressed by rte_1=...
e.g.
rte_1=visible=true
(*1)
x |
X-position. if "min" then automatically minimal position |
y |
Y-position. if "min" then automatically minimal position |
width |
width. if "max" then automatically maximal width |
height |
height. if "max" then automatically maximal height |
visible |
visibility. on with 1/j/y/t ... |
enabled |
activated. on with 1/j/y/t... |
redraw / setredraw |
redraw on/off |
backcolor |
Specifies the numeric value of the background color of the text editing area of the RichTextEdit. Values are -2 to 16,777,215. Example: rte_1=backcolor=<color:backroundcolor_activ> |
border |
Specifies whether the control has a border. Values are: TRUE - Has a border |
borderstyle |
Specifies the style of the border of the control. Values are: box, lowered, raised, shadowbox |
clear |
Clears the selected text (if any) from the control (but does not place it in the clipboard). |
copy |
Copies (but does not delete) the selected contents of the RichTextEdit control (if any) to the clipboard. |
copyrtf |
Copies the selected contents of the RichTextEdit control to a string in rich text format in value rte_1=copyrtf setitem=myrtftext=<value> |
cut |
Cuts (deletes) the selected contents from the RichTextEdit control (if any) to the clipboard. |
displayonly=true/false |
Specifies whether users can make changes to the contents. Values are: TRUE - The content, including text and input files, is protected (the user cannot edit it) FALSE - The user can edit the content |
documentname=<value> |
Specifies the name that will display in the print queue when the user prints the contents of the control. |
dragauto=true/false |
Specifies whether PowerBuilder will put the control automatically into Drag mode. Values are: TRUE - When the control is clicked, the control is automatically in Drag mode. FALSE - When the control is clicked, the control is not automatically in Drag mode. |
headerfooter=true/false |
Specifies whether the RichTextEdit control has a header/footer section. This property must be set in the painter and cannot be changed during execution. Values are: |
hscrollbar=true/false |
Specifies whether the RichTextEdit control has a horizontal scrollbar. Values are:TRUE - A scrollbar displays FALSE - A scrollbar does not display |
insertnewtextdocument=filename |
insert new textdocument. |
inserttextdocument=filename |
add textdocument |
insertnewrtfdocument=filename |
insert rtf-document |
insertrtfdocument=filename |
add rtf-document |
leftmargin=<pos> |
Specifies the width of the left margin on the printed page. |
paste |
Inserts the contents of the clipboard (if any) at the insertion point in the control. |
pastertf=<value> |
Inserts a string at the insertion point when the string contains text in rich text format. You can specify whether to insert the string in the header or footer band, as well as the main body (detail band). |
printpreview=true/false |
Flips between Preview of the document (where header/footer, page size, and so on, are shown) and normal RTE control display. |
popmenu=true/false |
Specifies whether the user has access to a pop-up menu by clicking the right mouse button on the control. The menu allows the user to cut and paste, insert a file, and select formatting options. Values are: true - Pop-up menu is enabled |
print=<pagerange> |
Prints the contents of the control. pagerange: A string describing the pages you want to print. To print all pages, specify an empty string (""). To specify a subset of pages, use dashes to specify a range and commas to separate ranges and individual page numbers—for example, "1-3" or "2,5,8-10". |
replacetext=<value> |
Replaces selected text with given string. If no text has been selected, insert given string at cursor location. |
resizable=true/false |
true = Controll is resizeable |
returnsvisible=true/false |
Specifies whether carriage returns are visible. Values are: true - Carriage returns are visible false - Carriage returns are hidden |
rigthtmargin=<value> |
Specifies the width of the right margin on the printed page. |
rulerbar=true/false |
Specifies whether a ruler bar is visible above the editing area. If visible, the user can use it to see measurements while setting tabs and margins on the tab bar (see the TabBar property). Values are: true - Ruler bar is visible false - Ruler bar is hidden |
savedocument=<filename> |
save as Rtf-File, Encoding ANSI! |
spacesvisible=true/false |
|
scroll=<linenum> |
Scrolls a multiline edit control or the edit control of a DataWindow a specified number of lines up or down. |
scrollnextpage |
Scrolls to the next page of the document |
scrollntextrow |
Scrolls to the next row of the document |
scrollpriorpage |
Scrolls to the prior page of the document |
scrollpriorrow |
Scrolls to the prior instance of the document |
scrolltorow=<linenum> |
Scroll to row.. |
selecttext=fromline=fromchar=toline=tochar |
Selects text beginning and ending at a line and character position example: select all: rte_1.selectrow=1=1=999=999
|
selecttext |
Selects text in the RichTextEdit control. |
selectedtext |
Returns the selected text in string "value" rte_1.selectedtext meldung=<value> |
selecttextline |
select the current line |
selecttextword |
select the current word |
setaligment=left/right/center/justifiy |
Sets the alignment of the selected paragraphs |
setfocus |
set focus to the controll |
setposition=<value> |
specifies the position of a control in the front-to-back order within a conotrol. behind - Position objectname behind precedingobject in the order totop - Position objectname on top of all other controls |
settextcolor=<rgbvalue> |
sets the color of selected text |
tabbar=true/false |
Specifies whether a bar for setting tabs is visible above the editing area. |
tabvisible=true/false |
Specifies whether tabs are visible. |
toolbar=true/false |
Specifies whether a tool bar for formatting text is visible above the editing area. |
topmargin=<value> |
Specifies the width of the top margin on the printed page. |
undo |
Cancels the last edit |
undodepth=<value> |
Sets the maximum number of activities that Undo will undo. |
vscrollbar |
Specifies whether the RichTextEdit control has a vertical scrollbar |
wordwrap |
Specifies whether text wraps automatically to the next line when the line reaches the margin |
Folgende Werte können über <...> abgefragt werden
<rte_1.modified> |
Specifies whether the document has been modified since it was opened or last saved. Modified is the control's "dirty" flag, indicating that the document is in an unsaved state. Values are: true - The document has been modified false - The document has not been modified |
<rte_1.selectedtext> |
return the selected text |
rte_modified |
|
rte_getfocus |
|
rte_rbuttondown |
global function resize
// Info:
//
dw_1=width=max
dw_1=height=100
rte_1=x=1
rte_1=y=120
rte_1=width=max
setvar=e_height=%sub(<window:client:height>,120)
rte_1=height=<e_height>
//
global end
global function rte_modified
setvar=e_modify=yes
end global
Event "Retrieve"
setvar=sys_resize=f
rte_1=backcolor=<color:backroundcolor_aktiv>
rte_1=visible=1
setvar=e_modify=No
*1) From Sybase - Powerbuilder 10 - Documentation