Text (statement)

Syntax Text x,y,width,height,title$ [,[.Identifier] [,[FontName$] [,[size] [,style]]]]
Description Defines a text control within a dialog box template. The text control only displays text; the user cannot set the focus to a text control or otherwise interact with it.
Comments The text within a text control word-wraps. Text controls can be used to display up to 32K of text. The Text statement accepts the following parameters:
Parameter Description
x, y Integer positions of the control (in dialog units) static to the upper left corner of the dialog box.
width, height Integer dimensions of the control in dialog units.
title$ String containing the text that appears within the text control. This text may contain an ampersand character to denote an accelerator letter, such as "&Save" for Save . Pressing this accelerator letter sets the focus to the control following the Text statement in the dialog box template.
Identifier Name by which this control can be referenced by statements in a dialog function (such as DlgFocus and DlgEnable). If omitted, then the first two words from title$ are used.
FontName$ Name of the font used for display of the text within the text control. If omitted, then the default font for the dialog is used.
size Size of the font used for display of the text within the text control. If omitted, then the default size for the default font of the dialog is used.
style Style of the font used for display of the text within the text control. This can be any of the following values:
ebRegular Normal font (that is, neither bold nor italic)
ebBold Bold font
ebItalic Italic font
ebBoldItalic Bold-italic font
If omitted, then ebRegular is used.
Example
Sub Main()
  Begin Dialog UserDialog 81,64,128,60,"Untitled"
    CancelButton 80,32,40,14
    OKButton 80,8,40,14
    Text 4,8,68,44,"This text is displayed in the dialog box."
  End Dialog
  Dim d As UserDialog
  Dialog d
End Sub
See Also CancelButton (statement); CheckBox (statement); ComboBox (statement); Dialog (function); Dialog (statement); DropListBox (statement); GroupBox (statement); ListBox (statement); OKButton (statement); OptionButton (statement); OptionGroup (statement); Picture (statement); PushButton (statement); TextBox (statement); Begin Dialog (statement), PictureButton (statement).
Note Accelerators are underlined, and the Alt+letter accelerator combination is used. 8-point MS Sans Serif is the default font used within user dialogs.