Rapid-Q Documentation by William Yu (c)1999-2000 Appendix A: QRICHEDIT

QRICHEDIT Component

QRichedit implements a fully featured multi-line text edit control.

QRichedit Properties
FieldTypeR/WDefaultSupport





AlignINTEGERRWalNoneW

Align determines how the control aligns within its parent control.
AlignmentINTEGERRWtaLeftJustifyW

Alignment determines how the text is aligned within the edit control.
BorderStyleINTEGERRWbsSingleW
ColorINTEGERRW
W
EnabledINTEGERRWTrueWXG
FontQFONTW
WX
HandleINTEGERR
W
HeightINTEGERRW
WXG
HideScrollBarsINTEGERRWTrueWG
HideSelectionINTEGER      .RWTrueW

Set  to False, or 0, to automatically scroll to show new content.
HintSTRINGRW
WG
LeftINTEGERRW0WXG
LineARRAY of STRINGRW
WXG
LineCountINTEGERRW
WXG
ModifiedINTEGERR
WG
ParentQFORM/QPANEL/QTABCONTROLW
WXG
PopupMenuQPOPUPMENUW
W
PlaintextINTEGERRWFalseW
ReadonlyINTEGERRWFalseWXG
ScrollBarsINTEGERRWssNoneWXG
SelAttributesQFONTW
W
SelLengthINTEGERRW
WXG

SelLength is the number of characters that are selected.
SelStartINTEGERRW
WXG

SelStart is the position of the first selected character in the text. If there is no selected text, SelStart indicates the position of the cursor.
SelTextSTRINGRW
WXG

SelText is the selected portion of the edit control's text.
ShowHintINTEGERRWFalseWG
TabOrderINTEGERRW
W
TagINTEGERRW
WXG
TextSTRINGRW
WXG
TopINTEGERRW0WXG
WantTabsINTEGERRWFalseW

WantTabs determines whether the user can insert tab characters into the text.
WidthINTEGERRW
WXG
WhereXINTEGERR
WXG
WhereYINTEGERR
WXG
WordwrapINTEGERRWTrueW
VisibleINTEGERRWTrueWXG


QRichedit Methods
MethodTypeDescriptionParamsSupport





AddStringsSUBI
AddStrings cannot add a string greater than 4094 characters. Instead use QRichEdit.Text = QRichEdit.Text + YourString
Add stringsSTRING, InfiniteWXG
ClearSUBClear entire text0WXG
CopyToClipboardSUBCopy selected text to clipboard0W
CutToClipboardSUBCut selected text to clipboard0W
LoadFromFileSUB (FileName$)Load text from a file1WXG
LoadFromStreamSUB (Stream AS QFILESTREAM/QMEMORYSTREAM)Load text from a stream1WX
PasteFromClipboardSUBPaste text from clipboard0W
SaveToFileSUB (FileName$)Save text to a file1WXG
SaveToStreamSUB (Stream AS QFILESTREAM/QMEMORYSTREAM)Save text to a stream1W
SelectAllSUBSelects all text from Richedit0WXG

QRichedit Events
EventTypeOccurs when...ParamsSupport





OnChangeVOIDText changes0WG
OnKeyDownSUB (Key AS WORD, Shift AS INTEGER)Key held down2WG
OnKeyPressSUB (Key AS BYTE)User presses a key1WG
OnKeyUpSUB (Key AS WORD, Shift AS INTEGER)Key released2WG
OnMouseDownSUB (Button%, X%, Y%, Shift%)Mouse button held down4WX
OnMouseMoveSUB (X%, Y%, Shift%)Mouse moves2WX
OnMouseUpSUB (Button%, X%, Y%, Shift%)Mouse button is released4WX


QRichedit Examples
  $INCLUDE "RAPIDQ.INC"

DIM Form AS QForm
DIM RichEdit AS QRichEdit

RichEdit.Parent = Form
RichEdit.Scrollbars = ssBoth
RichEdit.AddString "Hello world!"

Form.ShowModal

Prev Component Contents Next Component