Class TextBoxControl
Represents a Windows text box control. Wraps the System.Windows.Forms.TextBox control.
Inheritance
Inherited Members
Namespace: FastReport.Dialog
Assembly: FastReport.dll
Syntax
public class TextBoxControl : DataFilterBaseControl, IComponent, IDisposable, IFRSerializable, IHasEditor
Constructors
TextBoxControl()
Initializes a new instance of the TextBoxControl class with default settings.
Declaration
public TextBoxControl()
Properties
AcceptsReturn
Gets or sets a value indicating whether pressing ENTER in a multiline TextBox control creates a new line of text in the control or activates the default button for the form. Wraps the System.Windows.Forms.TextBox.AcceptsReturn property.
Declaration
public bool AcceptsReturn { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
AcceptsTab
Gets or sets a value indicating whether pressing the TAB key in a multiline text box control types a TAB character in the control instead of moving the focus to the next control in the tab order. Wraps the System.Windows.Forms.TextBoxBase.AcceptsTab property.
Declaration
public bool AcceptsTab { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
CharacterCasing
Gets or sets whether the TextBox control modifies the case of characters as they are typed. Wraps the System.Windows.Forms.TextBox.CharacterCasing property.
Declaration
public CharacterCasing CharacterCasing { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.CharacterCasing |
MaxLength
Gets or sets the maximum number of characters the user can type or paste into the text box control. Wraps the System.Windows.Forms.TextBoxBase.MaxLength property.
Declaration
public int MaxLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Multiline
Gets or sets a value indicating whether this is a multiline TextBox control. Wraps the System.Windows.Forms.TextBox.Multiline property.
Declaration
public bool Multiline { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ReadOnly
Gets or sets a value indicating whether text in the text box is read-only. Wraps the System.Windows.Forms.TextBoxBase.ReadOnly property.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ScrollBars
Gets or sets which scroll bars should appear in a multiline TextBox control. Wraps the System.Windows.Forms.TextBox.ScrollBars property.
Declaration
public ScrollBars ScrollBars { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.ScrollBars |
TextAlign
Gets or sets how text is aligned in a TextBox control. Wraps the System.Windows.Forms.TextBox.TextAlign property.
Declaration
public HorizontalAlignment TextAlign { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.HorizontalAlignment |
TextBox
Gets an internal TextBox.
Declaration
[Browsable(false)]
public TextBox TextBox { get; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.TextBox |
UseSystemPasswordChar
Gets or sets a value indicating whether the text in the TextBox control should appear as the default password character. Wraps the System.Windows.Forms.TextBox.UseSystemPasswordChar property.
Declaration
public bool UseSystemPasswordChar { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
WordWrap
Indicates whether a multiline text box control automatically wraps words to the beginning of the next line when necessary. Wraps the System.Windows.Forms.TextBoxBase.WordWrap property.
Declaration
public bool WordWrap { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
GetSelectionPoints()
Gets the object's selection points.
Declaration
protected override SelectionPoint[] GetSelectionPoints()
Returns
Type | Description |
---|---|
SelectionPoint[] | Array of SelectionPoint objects. |
Overrides
Remarks
Selection point is a small square displayed at the object's sides when object is selected in the designer. You can drag this square by the mouse to change the object's size. For example, the TextObject has eight selection points to change its width and height by the mouse.
If you are developing a new component for FastReport, you may override this method if your object has non-standard set of selection points. For example, if an object has something like "AutoSize" property, it would be good to disable all selection points if that property is true, to disable resizing of the object by the mouse.
GetValue()
Returns value entered in the control.
Declaration
protected override object GetValue()
Returns
Type | Description |
---|---|
System.Object | The value of type supported by this control. |
Overrides
Remarks
This method must return a value entered by the user. For example, TextBox control must return its Text property value. If this control supports multi-selection, return selected values in an array, for example string[] array for CheckedListBox.
OnLeave(EventArgs)
This method fires the Leave event and the script code connected to the LeaveEvent.
Declaration
public override void OnLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | Event data. |
Overrides
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).
ShouldSerializeBackColor()
Determines whether is necessary to serialize the BackColor property.
Declaration
protected override bool ShouldSerializeBackColor()
Returns
Type | Description |
---|---|
System.Boolean | true if serialization is necessary. |
Overrides
ShouldSerializeCursor()
Determines whether is necessary to serialize the Cursor property.
Declaration
protected override bool ShouldSerializeCursor()
Returns
Type | Description |
---|---|
System.Boolean | true if serialization is necessary. |
Overrides
ShouldSerializeForeColor()
Determines whether is necessary to serialize the ForeColor property.
Declaration
protected override bool ShouldSerializeForeColor()
Returns
Type | Description |
---|---|
System.Boolean | true if serialization is necessary. |