Click or drag to resize

TextBox Class

X#
Present the user with a text message box.
Inheritance Hierarchy
Object
  VObject
    TextBox
      ErrorBox
      InfoBox
      WarningBox

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax
 CLASS TextBox INHERIT VObject
Request Example View Source

The TextBox type exposes the following members.

Constructors
  NameDescription
Public methodTextBox
Create a message box.
Top
Properties
  NameDescription
Public propertyBeep
A logical value indicating whether to use a system default beep when displaying the text box. TRUE indicates that there will be a beep; FALSE indicates that there will be no beep.
Public propertyCaption
A string value representing the TextBox caption.
Public propertyMessage
A string value representing the TextBox message.
Public propertyCode exampleType
A constant or combination of constants that indicates which push buttons and/or icons are displayed in the message box
Top
Methods
  NameDescription
Public methodDestroy
Free memory resources allocated for a VObject object and its derived objects.
(Inherited from VObject.)
Public methodShow
Display this message box and return a value indicating how it was closed.
Top
Fields
  NameDescription
Public fieldoCargo
Cargo slot.
(Inherited from VObject.)
Top
Remarks
A message box is a small window that displays a caption, a message, an icon (chosen from a predefined set of icons), and push buttons (selected from a variety of predefined combinations). It provides an easy alternative to the dialog window when all you require from the user is a simple response. Message boxes require no sizing, positioning, or event handling. In addition, message boxes can be application modal (no processing can continue in the application until the user has acknowledged the message box), or it can be modal in relation to its owner window (no processing can continue in its owner window until the user has acknowledged the message box).
Examples
The following example handles a QueryClose event:
X#
1METHOD QueryClose(oEvent) CLASS TopAppWindow
2oTB := TextBox{SELF, "Quit", "Do you really want to quit?"}
3oTB:TYPE := BOXICONQUESTIONMARK + BUTTONYESNO
4IF (oTB:Show() = BOXREPLYYES)
5RETURN TRUE // Quit application.
6ELSE
7RETURN FALSE
8// Don't quit the application.
9ENDIF
See Also

Reference