Purpose Use the built-in functions of the native
control interface for the Text control
For most tasks it is not advisable to
program your own VB functions that communicate with the special SAP
UI controls such as grid control or tree control. The SAP UI
controls are more complex than one might think, since they
handle user actions, read and write the SAP GUI datastream and
communicate with SAP application. So your VB function is player
number three or four in this system.
The following functions, built in into the GuiXT Controls
interface "guinet.dll", cover most of what is normally needed.
Please observe:
- All functions have obligatory
and optional parameters. We
suggest you use the "by name" calling for all optional
parameters.
- All functions can either be called from your GuiXT script, in most cases with
CallVBAsync, or from your own VB.NET function. If you need to
evaluate the return code of the built-functions it is often more
practical to call up your own VB.NET function with
CallVBAsync and then call the built-in function from there.
|
TextControl.GetText
Reads the content of a text control and sets a GuiXT text
variable, if specified
CallVBAsync
guinet.TextControl.GetText
Parameters
1 textName Default: ""
Name of a GuiXT text variable. The text is set into the text variable.
2 textNo Default:
1
Number of the text control on screen.
3 tc Default: Nothing
Can be used from VB.NET if you already have the object pointer for the
text control
Returns Content of the text control
Example: CallVBAsync
guinet.TextControl.GetText
textName:="head"
|
TextControl.GetLineCount
Returns the number of text lines
CallVBAsync
guinet.TextControl.GetLineCount
Parameters
1 textNo Default:
1
Number of the text control on screen
2 tc Default: Nothing
Can be used from VB.NET if you already have the object pointer for the
text control
Returns Number of text lines Empty
lines are counted except empty lines at the end of the text
Example: CallVBAsync
linecount =
guinet.TextControl.GetLineCount
|
TextControl.SetText
Sets the content of a text control
CallVBAsync
guinet.TextControl.SetText
Parameters
1 textName
Name of a GuiXT text variable containing the nex text
2 textNo Default:
1
Number of the text control on screen
3 tc Default: Nothing
Can be used from VB.NET if you already have the object pointer for the
text control
Returns The new content of the text control. or ""
if the text control was not found or is read-only
Example:
CallVBAsync
guinet.TextControl.SetText
textName:="head"
|
TextControl.SetReadonly
Sets a text control to read-only
CallVBAsync
guinet.TextControl.GetReadonly
Parameters
1
undo Default: "N" Note: before GuiXT 2023 Q2 3 the default was incorrectly "X".
If "X", resets the read-only property i.e. text becomes changeable
2 textNo Default:
1
Number of the text control on screen
3 tc Default: Nothing
Can be used from VB.NET if you already have the object pointer for the
text control
Returns "X" if text control was found
Example:
CallVBAsync
guinet.TextControl.SetReadonly undo:="N"
TextControl.GetReadonly
Returns the read-only property of the text
CallVBAsync
guinet.TextControl.GetReadonly
Parameters
1 textNo Default:
1
Number of the text control on screen
2 tc Default: Nothing
Can be used from VB.NET if you already have the object pointer for the
text control
Returns "X" if text control was found and
the text is read-only
Example:
CallVBAsync
readonly = guinet.TextControl.GetReadonly
TextControl.SetFocus
Sets the focus on the text control.
CallVBAsync
guinet.TextControl.SetFocus
Parameters
1 textNo Default: 1
Number of the text control on screen
Returns "X" if
text control
was found
|
Components
InputAssistant + Controls
|