Main Page | Packages | Class Tree | Index | Help

xp.controls

class TextBase

MovieClip
  |
  +--xp.system.UIControl
        |
        +--xp.controls.TextBase

All Known Subclasses: ButtonEditor, HTMLText, Label, MenuItem, SpinnerBase, TextInput

class TextBase
extends UIControl

Base class for components that wrap a text field


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
leading: Number
Indicates the amount of vertical space (called leading) between lines.

public
leftMargin: Number
Indicates the left margin of the paragraph, in points.

public
rightMargin: Number
Indicates the right margin of the paragraph, in points.

public
textIndent: Number
Indicates the indentation from the left margin to the first character in the paragraph.

Fields inherited from class xp.system.UIControl

__layout, allowDrop, autoLayout, bindingDefaultValue, bindingFormatter, bindingPath, bindingSource, bindingType, bindingValidator, border, causesValidation, classInfo, clickOnENTER, clickOnSPACE, container, context, data, disableAcceptButton, disableCancelButton, enableBGMouseEvents, enableDblClickEvent, enableKeyDownEvents, enableKeyEvents, enableKeyUpEvents, enableMouseWheelEvents, formatterOptions, horizontalAlignment, index, isBinding, itemId, logEnabled, parent, parentContainer, parentForm, percentageHeight, percentageWidth, styleClass, tabIndex, tabStop, tooltip, tree, verticalAlignment

Property Summary

public
font: TextFormat (read, write)
Get or set the font used in the control.

public
fontBold: Boolean (read, write)
Indicates whether text is boldface.

public
fontColor: Number (read, write)
Indicates the color of text.

public
fontEmbed: Boolean (read, write)
Indicates whether the text field uses embedded font outlines or device fonts.

public
fontFamily: String (read, write)
Indicates the font name of the text with a text format.

public
fontItalic: Boolean (read, write)
Indicates whether text is italicized.

public
fontName: String (read, write)
Deprecated. Use fontFamily

public
fontSize: Number (read, write)
Indicates the point size of text.

public
fontStyle: String (read, write)
Whether the text is italic or not.

public
fontUnderline: Boolean (read, write)
Indicates whether text is underlined.

public
fontWeight: String (read, write)
Whether the text is bold or not.

public
text: String (read, write)
Gets or sets the text content of the control

public
textAlign: String (read, write)
Indicates the alignment of a control.

public
textDecoration: String (read, write)
Determines whether the text is underlined or not.

public
textWrap: Boolean (read, write)
Gets or sets whether wordWrap is enabled

Properties inherited from class xp.system.UIControl

alpha, autosize, background, backgroundVisible, bindings, borderBrush, borderRadius, borderShadow, borderStyle, borderThickness, bottom, dataSource, enableMouseEvents, focusManager, height, id, isEnabled, isFocused, isMouseOver, isPressed, isSelected, isValid, layout, left, margin, maxHeight, maxWidth, measuredHeight, measuredMinHeight, measuredMinWidth, measuredWidth, minHeight, minWidth, padding, readOnly, resources, right, styleName, top, triggers, visible, width, x, y

Constructor

public
TextBase ( )
Constructor - This should not be called directly. See sub classes


Method Summary

public static
getTextEllipsis ( f: TextFormat, s: String, w: Number ): String
Returns string with an ellipsis if the string is wider than the specified width

public static
getTextExtent ( f: TextFormat, s: String, w: Number, h: Boolean ): Object
Returns text measurement information for a text string.

Methods inherited from class xp.system.UIControl

addBinding, addBindings, addEventListener, addPropertyTrigger, applyStyle, beginDeferUpdate, canUpdate, centerContent, checkState, containsFocus, destroy, destroyObject, drawFocus, endDeferUpdate, findFocusFromObject, findFocusInChildren, getBinding, getBounds, getCenter, getClass, getFocus, getFocusManager, getFocusRect, getLocation, getPropertyValue, getSize, getStateName, getTrigger, globalToLocalPoint, invalidate, invalidateLayout, invalidateSize, invalidateSizeAndLayout, invalidChild, isChild, isMouseDirectlyOver, isParent, localToGlobalPoint, localToLocalPoint, measure, mouseWheel, move, onChildFocus, onKillFocus, onSetFocus, processEnterKey, processEscapeKey, processTabKey, redraw, refresh, removeEventListener, routeEvent, setBounds, setFocus, setLocation, setPropertyValue, setSize, setValueChanged, update, validate



Field Documentation

leading

public var leading: Number
Indicates the amount of vertical space (called leading) between lines.

the amount of vertical space (called leading) between lines.
The default value is null, which indicates that the property is undefined.

leftMargin

public var leftMargin: Number
Indicates the left margin of the paragraph, in points.

the left margin of the paragraph, in points.
The default value is null, which indicates that the property is undefined.

rightMargin

public var rightMargin: Number
Indicates the right margin of the paragraph, in points.

the right margin of the paragraph, in points.
The default value is null, which indicates that the property is undefined.

textIndent

public var textIndent: Number
Indicates the indentation from the left margin to the first character in the paragraph.

an integer that indicates the indentation from the left margin to the first character in the paragraph.
The default value is null, which indicates that the property is undefined.


Property Documentation

font

public font: TextFormat (read, write)
Get or set the font used in the control.

The font is a TextFormat object

fontBold

public fontBold: Boolean (read, write)
Indicates whether text is boldface.

A Boolean value that specifies whether the text is boldface.
The default value is false. If the value is true, then the text is boldface.

fontColor

public fontColor: Number (read, write)
Indicates the color of text.

Indicates the color of text. A number containing three 8-bit RGB components.

fontEmbed

public fontEmbed: Boolean (read, write)
Indicates whether the text field uses embedded font outlines or device fonts.

A Boolean value that, when true, renders the text field using embedded font outlines.
If false, it renders the text field using device fonts.

fontFamily

public fontFamily: String (read, write)
Indicates the font name of the text with a text format.

The name of the font for text in this text format, as a string.
The default value is _sanes.

fontItalic

public fontItalic: Boolean (read, write)
Indicates whether text is italicized.

Boolean value that indicates whether text in this text format is italicized.
The default value is false.

fontName

public fontName: String (read, write)
Deprecated. Use fontFamily

Indicates the font name of the text with a text format.

The name of the font for text in this text format, as a string.
The default value is _sans.

fontSize

public fontSize: Number (read, write)
Indicates the point size of text.

the point size of text in this text format.
The default value is 11.

fontStyle

public fontStyle: String (read, write)
Whether the text is italic or not.

Recognized values are "normal" and "italic".
The default is "normal".

fontUnderline

public fontUnderline: Boolean (read, write)
Indicates whether text is underlined.

A Boolean value that indicates whether the text that uses this text format is underlined (true) or not (false).
This underlining is similar to that produced by the tag, but the latter is not “true” underlining, because it does not skip descenders correctly.
The default value is false.

fontWeight

public fontWeight: String (read, write)
Whether the text is bold or not.

Recognized values are "normal" and "bold".
The default is "normal".

text

public text: String (read, write)
Gets or sets the text content of the control

textAlign

public textAlign: String (read, write)
Indicates the alignment of a control.

Indicates the alignment of the paragraph, represented as a string.
The alignment of the paragraph, represented as a string.
If "left", the content is left-aligned. If "center", the content is centered. If "right", the content is right-aligned. If "top", the content is top-aligned, If the content is "bottom", the content is bottom aligned. If the content is "middle" the content is middle aligned. The default value is middleLeft.

textDecoration

public textDecoration: String (read, write)
Determines whether the text is underlined or not.

Recognized values are "none" and "underline".
The default value is "none".

textWrap

public textWrap: Boolean (read, write)
Gets or sets whether wordWrap is enabled


Constructor Documentation

TextBase

public function TextBase()
Constructor - This should not be called directly. See sub classes


Method Documentation

getTextEllipsis

public static function getTextEllipsis(f: TextFormat,
 s: String,
 w: Number): String
Returns string with an ellipsis if the string is wider than the specified width

Parameters:
f
The TextFormat object to use
s
The string to test
w
The available width
Returns:
An string of the required width

getTextExtent

public static function getTextExtent(f: TextFormat,
 s: String,
 w: Number,
 h: Boolean): Object
Returns text measurement information for a text string.

MM components dont like us to use getTextExtent so we HAVE to use this.

Parameters:
f
The TextFormat object to use
s
The string to test
w
The wrapping width
h
The text contains html
Returns:
An object with the properties textWidth, textHeight, textFieldHeight, textFieldWidth


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc