GetPanelNum(name As String) As Integer

 

Returns the index of the currently active panel of a PanelBox.

  

Returns:

 

Type

Value

Description

Integer

0 - n

Value of the active PagelPanel. First panel is 0

 

-1

An error occurred. name was not found.

 

-2

A string of spaces was passed in as name

 

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

 

 Used in:

 

XojoScript Name

GUID

Generate Printlabel and linkbox text

74855E25-5542-4B9D-B821-04C414425526

Create letter in Word, from address

90AC7CD7-EE78-4659-8076-076E96B9EF5B

Print label on label printer, from address

4FDBEDF3-48AD-46A4-91CB-CA57D66480AE

 

Example XojoScript:

 

Dim label As String

If GetPanelNum("imPanelBoxLabel") = 0 Then

label = GetText("imTA_adr_Label")

Else

label = GetText("imTA_adr_Label2")

End If

MsgBox(label)