DIAdem Help

Method: RunCustomAction for Text

  • Updated2024-09-12
  • 2 minute(s) read

Method: RunCustomAction for Text

Triggers the EventCustomAction event. You can use this event anywhere, for any purpose.

Object.RunCustomAction(VarParam)
ObjectText
Object with this method
VarParamVariant
Any transfer parameter

The following example assigns a text to the DIAdem variable sMyAction when the Button1 button is clicked, and triggers the EventCustomAction event for the Text1 control:

Sub Button1_EventClick(ByRef This)
  Dim sMyAction
  sMyAction = "UpperLimit"
  Call Text1.RunCustomAction(sMyAction)
End Sub

The following example shows the event Text1 associated with the TabPageCtrl1 control. The event checks the transfer parameters and executes the respective instructions.

Sub Text1_EventCustomAction(ByRef This, VarParam)
  If VarParam = "UpperLimit" Then
    This.Text = "Limit exceeded"
  End If
End Sub