GetPanel(name As String) As String

 

Retrieves the name of the currently active panel of a PanelBox.

  

 

 

Returns:

 

Type

Value

Description

String

Name displayed on the active panel

Before we programmatically access input-fields on a PanelBox, we may want to determine the current frontmost panel.

 

Parameters:

 

Name

Type

Description

name

String

The name corresponds to the ScreenFieldName of a PanelBox. One can display the name of a PanelBox by right-clicking (Ctrl+Click) its heading tab-panel.

 

Available in:

 

WindowMain

WindowLink

YES

YES

  

Example XojoScript:

 

Dim label As String

If GetPanel("imPanelBoxLabel") = "MAIN ADDRESS" Then

label = GetText("imTA_adr_Label")

Else

label = GetText("imTA_adr_Label2")

End If

MsgBox(label)