MultiLineEdit control

A MultiLineEdit control is a box in which the user can enter and edit more than one line of text. You typically use a MultiLineEdit as an input field.

Properties

MultiLineEdit property

Datatype

Description

Accelerator

Integer

Specifies the ASCII value of the key you want to assign as the accelerator key for a control.

AccessibleDescription

String

A description of the control and/or its purpose for use by accessibility tools such as readers for visually impaired users.

AccessibleName

String

A label that briefly describes the control, such as the text in a button or the name of a menu item.

AccessibleRole

AccessibleRole (enumerated)

Describes what kind of user interface element the control is.

Alignment

Alignment (enumerated)

Specifies the text alignment in the control. Values are:

Center!

Justify!

Left!

Right!

AutoHScroll

Boolean

Specifies whether the control automatically scrolls horizontally when data is entered or deleted. Values are:

TRUE -- Control automatically scrolls horizontally.

FALSE -- Control does not automatically scroll horizontally.

AutoVScroll

Boolean

Specifies whether the control automatically scrolls vertically when data is entered or deleted. Values are:

TRUE -- Control automatically scrolls vertically.

FALSE -- Control wraps.

BackColor

Long

Specifies the numeric value of the background color: -2 to 16,777,215. For more information about color, see the section called “RGB” in PowerScript Reference.

Border

Boolean

Specifies whether the control has a border. Values are:

TRUE -- Control has a border.

FALSE -- Control does not have a border.

BorderStyle

BorderStyle (enumerated)

Specifies the style of the border of the control. Values are:

StyleBox!

StyleLowered!

StyleRaised!

StyleShadowBox!

BringToTop

Boolean

Specifies whether PowerBuilder moves the control to the top of the front-to-back order in the window. Values are:

TRUE -- Control moved to top.

FALSE -- Control not moved to top.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

DisplayOnly

Boolean

Specifies whether the text is display only and cannot be changed by the user. Values are:

TRUE -- Text cannot be changed by user.

FALSE -- Text can be changed by user.

DragAuto

Boolean

Specifies whether PowerBuilder puts 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. You have to manually put the control into Drag mode by using the Drag function.

DragIcon

String

Specifies the name of the stock icon or the file containing the icon you want to display when the user drags the control (the ICO file). The default icon is a box the size of the control.

When the user drags the control, the icon displays when the control is over an area in which the control can be dropped (a valid drop area). When the control is over an area that is not a valid drop area, the No-Drop icon displays.

Enabled

Boolean

Specifies whether the control is enabled (can be selected). Values are:

TRUE -- Control can be selected.

FALSE -- Control cannot be selected.

FaceName

String

Specifies the name of the typeface in which the text of the control displays (for example, Arial or Tahoma).

FontCharSet

FontCharSet (enumerated)

Specifies the font character set used for the text in the control. For a complete list of possible values, see the list of properties for the FontCharSet variable on the Enumerated tab page of the Browser.

FontFamily

FontFamily (enumerated)

Specifies the font family (type style) used for the text in the control. Values are:

AnyFont!

Decorative!

Modern!

Roman!

Script!

Swiss!

FontPitch

FontPitch (enumerated)

Specifies the pitch (spacing) of the font used for the text in the control. Values are:

Default!

Fixed!

Variable!

Height

Integer

Specifies the height of the control, in PowerBuilder units.

HideSelection

Boolean

Specifies whether selected text stays selected (highlighted) even when the control does not have focus. Values are:

TRUE -- Text does not stay highlighted.

FALSE -- Text stays highlighted.

HScrollBar

Boolean

Specifies whether a horizontal scroll bar displays. Values are:

TRUE -- Horizontal scroll bar displays.

FALSE -- Horizontal scroll bar does not display.

IgnoreDefaultButton

Boolean

Specifies whether the Clicked event for the window's Default command button is triggered when user presses Enter. Values are:

TRUE  -- Do not trigger Clicked event; add new line in MultiLineEdit control.

FALSE  -- (Default) Trigger Clicked event; do not add new line in MultiLineEdit control.

ImeMode

Integer

Specifies the input method editor mode. This property is relevant only to applications running on a Japanese version of PowerBuilder.

Italic

Boolean

Specifies whether the text in the control is italic. Values are:

TRUE -- Text is italic.

FALSE -- Text is not italic.

Limit

Integer

Specifies the maximum number of characters (0 to 32,767) that can be entered in the control (0 means unlimited).

Pointer

String

Specifies the name of the stock pointer or the file containing the pointer used for the control.

RightToLeft

Boolean

Specifies that characters should be displayed in right-to-left order. The application must be running on an operating system that supports right-to-left display. Values are:

TRUE -- Characters display in right-to-left order.

FALSE -- Characters display in left-to-right order.

TabOrder

Integer

Specifies the tab value of the control within the window (0 means the user cannot tab to the control).

TabStop[ ]

Integer

Specifies the positions of the tab stops in the control. The tab stops are in character positions, and the tab stop delimiter is a space. If you assign a value to only the first tab stop, TabStop[1], the tab stops are equally spaced using the number of character positions specified for the first tab stop. If more than one tab stop is entered, tab stops are located in the positions specified. You can define 16 tab stops in the control; the default array is TabStop[8], with a tab stop every eight character positions.

Tag

String

Specifies the tag value assigned to the control.

Text

String

Specifies the text that displays in the control.

TextCase

TextCase (enumerated)

Specifies the case in which text entered in the control displays. Values are:

AnyCase!

Lower!

Upper!

TextColor

Long

Specifies the numeric value of the color used for text: -2 to 16,777,215. For more information about color, see the section called “RGB” in PowerScript Reference.

TextSize

Integer

Specifies the size of the text in the control, in points. For backward compatibility, the size is stored as a negative number; for example, 10-point text size is stored as -10.

Underline

Boolean

Specifies whether the text in the control is underlined. Values are:

TRUE -- Text is underlined.

FALSE -- Text is not underlined.

Visible

Boolean

Specifies whether the control is visible. Values are:

TRUE -- Control is visible.

FALSE -- Control is not visible.

VScrollBar

Boolean

Specifies whether a vertical scroll bar is displayed on the right of the control. Values are:

TRUE -- Vertical scroll bar is displayed.

FALSE -- Vertical scroll bar is not displayed.

Weight

Integer

Specifies the stroke weight of the text in the control; for example, 400 for normal or 700 for bold.

Width

Integer

Specifies the width of the control, in PowerBuilder units.

X

Integer

Specifies the X position (the distance from the left edge of the window), in PowerBuilder units.

Y

Integer

Specifies the Y position (the distance from the top of the window), in PowerBuilder units.


Events

MultiLineEdit event

Occurs

Constructor

Immediately before the Open event occurs in the window

Destructor

Immediately after the Close event occurs in the window

DragDrop

When a dragged control is dropped on the control

DragEnter

When a dragged control enters the control

DragLeave

When a dragged control leaves the control

DragWithin

When a dragged control is within the control

GetFocus

Just before the control receives focus (before it is selected and becomes active)

Help

When the user presses the F1 key or drags the context help button (question mark) from the title bar to a menu item or control

LoseFocus

When the control loses focus (becomes inactive)

Modified

When a control has been changed and loses focus

Other

When a Controls message occurs that is not a PowerBuilder event

RButtonDown

When the right mouse button is pressed on the control


Functions

MultiLineEdit function

Datatype returned

Description

CanUndo

Boolean

Returns true if the Undo function can be used to undo the last edit in the control and returns false if it cannot

ClassName

String

Returns the name assigned to the control

Clear

Integer

Clears the selected text (if any) from the control (but does not place it in the clipboard)

Copy

Integer

Copies (but does not delete) the selected text (if any) from the control to the clipboard

Cut

Integer

Cuts (deletes) the selected text (if any) from the control to the clipboard

Drag

Integer

Starts or ends the dragging of the control

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service

GetParent

PowerObject

Returns a reference to the name of the parent object

Hide

Integer

Makes the control invisible

LineCount

Integer

Returns the number of lines in the MultiLineEdit

LineLength

Integer

Returns the length of the line in which the insertion point is positioned

Move

Integer

Moves the control to a specified location

Paste

Integer

Inserts the contents of the clipboard (if any) at the insertion point in the control

PointerX

Integer

Returns the distance of the pointer from the left edge of the control

PointerY

Integer

Returns the distance of the pointer from the top of the control

Position

Integer

Returns the position of the insertion point in the control

PostEvent

Boolean

Adds the specified event to the end of the event queue for the specified object

Print

Integer

Prints the control

ReplaceText

Integer

Replaces the currently selected text (if any) with the specified string. If no text is selected, the ReplaceText function inserts the text at the insertion point

Resize

Integer

Changes the size of the control

Scroll

Integer

Moves the contents of the control up or down by the specified number of lines

SelectedLength

Integer

Returns the length of the selected text (if any) in the control

SelectedLine

Integer

Returns the number of the line in which the insertion point is currently located

SelectedStart

Integer

Returns the starting position of the selected text (if any) in the control

SelectedText

String

Returns a string with the selected text (if any) from the control

SelectText

Integer

Selects the text specified by the starting position and length

SetFocus

Integer

Sets focus to the specified control

SetPosition

Integer

Specifies the position of the control in the front-to-back order of the window

SetRedraw

Integer

Controls automatic redrawing of the control after each change in its properties

Show

Integer

Makes the control visible

TextLine

String

Returns the entire text of the line in which the insertion point is currently located

TriggerEvent

Integer

Triggers a specified event in the control and executes the script for the event

TypeOf

Object

Returns the type of the control

Undo

Integer

Cancels the previous editing function performed in the control