Skip to main content

TextBox Methods

An object defining methods for the TextBox class.

ScrollTo()

Scrolls to the control.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


HideLoading()

Removes the loading state from the control.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnTextChanged(sender, e)

Raises the TextChanged event after the text property has been updated.

Parameters:

sender (required): object
The source of the event.

e (required): PropertyChangedEventArgs<string>
The event arguments containing the old and new text values.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


FireClick()

Triggers the Click event.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnInit(sender, e)

Raises the Init event.

Parameters:

sender (required): object
The source of the event.

e (required): InitEventArgs
The initialization event arguments.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetDifferences(otherObj)

Compares the current instance with another control and returns property differences, including placeholder and text alignment.

Parameters:

otherObj (required): object
The object to compare with.

Returns:

Type: Dictionary<string, object>
A dictionary of property differences.

This is a sync method. Method runs synchronously.


Hide()

Hides the control.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnPropertyValueGet(sender, e)

Raises the PropertyValueGet event.

Parameters:

sender (required): object
The source of the event.

e (required): GetControlPropertyValueEventArgs
The property value get event arguments.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


Show()

Makes the control visible.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


Equals(other)

Determines whether the specified TextBox is equal to the current control.

Parameters:

other (required): #linkDocument(csharp-Bimser.CSP.FormControls.Base.MultiLanguageTextBox)
The control to compare with the current instance.

Returns:

Type: bool
true if the specified control is equal to the current control; otherwise, false.

This is a sync method. Method runs synchronously.


SetValueAsObject(value)

Sets the internal multi-language text using a dictionary of language-text pairs.

Parameters:

value (required): Dictionary<string, string>
The dictionary containing language codes and their corresponding texts.

Returns:

Type: void
Method does not return anything


OnMultiLanguageTextChanged(sender, e)

Raises the MultiLanguageTextChanged event after the multi-language text has been changed.

Parameters:

sender (required): object
The source of the event.

e (required): PropertyChangedEventArgs<MultiLanguageText>
The event arguments including old and new values.

Returns:

Type: void
Method does not return anything


OnDataLoad(sender, e)

Raises the DataLoad event with the provided arguments.

Parameters:

sender (required): object
The source of the event.

e (required): DataLoadEventArgs
The event data containing the payload to load.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnRender(sender, e)

Raises the Render event.

Parameters:

sender (required): object
The source of the event.

e (required): RenderEventArgs
The render event arguments.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnLoad(sender, e)

Raises the Load event.

Parameters:

sender (required): object
The source of the event.

e (required): LoadEventArgs
The load event arguments.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnValueChanging(sender, e)

Raises the ValueChanging event with the provided arguments and attaches metadata to the event output.

Parameters:

sender (required): object
The source of the event.

e (required): PropertyChangingEventArgs<#linkDocument(csharp-TEventValue)>
The event arguments including old and new values, and a cancel flag.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetProtectedData(isDisabledOrReadOnly)

#import (Bimser.CSP.FormControls.Base.ICanProtectData.GetProtectedData(bool)) (shortDescription)

Parameters:

isDisabledOrReadOnly (required): bool
Indicates whether to include only properties that must be protected when the control is disabled or read-only.

Returns:

Type: Dictionary<string, object>
Returns a dictionary of protected properties and their values for integrity verification.

This is a sync method. Method runs synchronously.


RemoveText()

Removes the current text content from the control.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


ToggleLoading()

Toggles the loading state of the control.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetDifferences(otherObj)

Compares the current instance with another control and returns the differences.

Parameters:

otherObj (required): object
The object to compare with.

Returns:

Type: Dictionary<string, object>
A dictionary of differences between the current instance and the other control.

This is a sync method. Method runs synchronously.


SetPropertyValue(mapping, value)

Sets the value of a property specified by a mapping.

Parameters:

mapping (required): List<string>
A list of strings defining the property path.

value (required): object
The value to set for the property.

Returns:

Type: void
Method does not return anything


ClearDefaultValue()

Clears the control’s default value. Can be overridden in derived classes.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


LoadData(sender, e)

Loads the given data into the control by assigning it to both the Text and Value properties.

Parameters:

sender (required): object
The source of the event.

e (required): DataLoadEventArgs
The event arguments containing the data to be loaded.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnValueChanged(sender, e)

Raises the ValueChanged event with the provided arguments.

Parameters:

sender (required): object
The source of the event.

e (required): PropertyChangedEventArgs<#linkDocument(csharp-TEventValue)>
The event arguments including old and new values.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnMultiLanguageTextChanging(sender, e)

Raises the MultiLanguageTextChanging event before the multi-language text is changed.

Parameters:

sender (required): object
The source of the event.

e (required): PropertyChangingEventArgs<MultiLanguageText>
The event arguments including old and new values, and a cancel flag.

Returns:

Type: void
Method does not return anything


OnPropertyChanged(sender, e)

Handles the property changed event.

Parameters:

sender (required): object
The source of the event.

e (required): PropertyChangedEventArgs<object>
The property changed event arguments.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetValueAsObject()

Gets the current value of the control as a generic object. Override to return meaningful data in derived types.

Returns:

Type: object
The control value as an object.

This is a sync method. Method runs synchronously.


ShowLoading()

Sets the control to a loading state.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnPreRender(sender, e)

Raises the PreRender event.

Parameters:

sender (required): object
The source of the event.

e (required): PreRenderEventArgs
The pre-render event arguments.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetDifferences(otherObj)

Compares the current control with another and returns a dictionary of differences.

Parameters:

otherObj (required): object
The object to compare against.

Returns:

Type: Dictionary<string, object>
A dictionary of property differences.

This is a sync method. Method runs synchronously.


Equals(obj)

Determines whether the specified object is equal to the current control.

Parameters:

obj (required): object
The object to compare with the current instance.

Returns:

Type: bool
true if the object is a TextBox and equal to the current control; otherwise, false.

This is a sync method. Method runs synchronously.


OnValidating(sender, e)

Raises the Validating event with the provided arguments.

Parameters:

sender (required): object
The source of the event.

e (required): ValidatingEventArgs
The event data containing validation context and messages.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnTextChanging(sender, e)

Raises the TextChanging event with the given arguments and attaches change metadata.

Parameters:

sender (required): object
The source of the event.

e (required): PropertyChangingEventArgs<string>
The event arguments containing the old and new text, and a cancel flag.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnPropertyChanging(sender, e)

Handles the property changing event.

Parameters:

sender (required): object
The source of the event.

e (required): PropertyChangingEventArgs<object>
The property changing event arguments.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


SetText(text)

Sets the text content of the control.

Parameters:

text (required): string
The new text to assign.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


RemoveAll()

Removes all editable content from the control.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


OnDoubleClick(sender, e)

Raises the DoubleClick event.

Parameters:

sender (required): object
The source of the event.

e (required): MouseEventArgs
The mouse event arguments.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetData()

Gets the control’s current data, including type, text, and value, as a structured object.

Returns:

Type: FormControlDataWithType
The structured control data.

This is a sync method. Method runs synchronously.


IsValid()

Returns a value indicating whether the control’s current value is valid.

Returns:

Type: bool
true if the value is valid; otherwise, false.

This is a sync method. Method runs synchronously.


OnClick(sender, e)

Raises the Click event.

Parameters:

sender (required): object
The source of the event.

e (required): MouseEventArgs
The mouse event arguments.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetText()

Returns the current text value of the control.

Returns:

Type: string
The text content of the control.

This is a sync method. Method runs synchronously.


GetHashCode()

Returns a hash code for the current control instance.

Returns:

Type: int
The hash code for the control.

This is a sync method. Method runs synchronously.