WinStudio
IWSFormComponent interface
Sets or returns a string containing the value of an editable component.
If the component is bound to a property, then setting its value updates the property, marks the property modified, and notifies other dependents on the property (such as other components bound to it) to refresh.
object.Text = string
Part |
Description |
object | Required. A reference to an editable component object. |
string | Required. The new value to be assigned to the component. |
object.Text
Part |
Description |
object | Required. A reference to an editable component object. |
WinStudio stores the values of editable components as character strings.
In a tree component, this property returns the value of the first property in the current node.
With the exception of how date and numeric formats are presented, this property is the same as the TextInternal property. For instance, with this property, dates are presented using the current locale display format. With the TextInternal property, the date is presented using the WinStudio internal date format.
Example 1
Sub Main() Dim oComponent As IWSFormComponent Dim value1 As String Dim value2 As String 'Show current field values: oComponent = ThisForm.Components("FirstGridCol") value1 = oComponent.Text value2 = ThisForm.Components("SecondGridCol").Text Application.ShowMessage("First column value: " _ & value1 & vbLf & "Second column value: " _ & value2) 'Swap values and display confirmation message: oComponent.Text = value2 ThisForm.Components("SecondGridCol").Text = value1 Application.ShowMessage("The text should now be swapped!") End Sub
NotifyDependentsToRefresh Method
SetCurrentObjectProperty Method
SetCurrentObjectPropertyModified Method
SetCurrentObjectPropertyPlusModifyRefresh Method
SetObjectPropertyModified Method
SetObjectPropertyPlusModifyRefresh Method