### TitledPanes Switch in an Accordion

B4J v5.00
There is an Accordion Container. See B4J HowTo Category Accordion.
B4J earlier versions
Defined is an accordion with two titledpanes View and Manage.
Private accordionMain As Node
Private titledpaneView As Node
Private titledpaneManage As Node
To switch to a pane and expand the pane use:
' View the View pane :-) = the webview of the description
`Sub menuitemViewView_Action
titledpaneView.RequestFocus
Dim jo As JavaObject = titledpaneView
Dim b As Boolean = True
jo.RunMethod("setExpanded", Array As Object(b))
End Sub`
' View the manage pane
`Sub menuitemViewManage_Action
titledpaneManage.RequestFocus
Dim jo As JavaObject = titledpaneManage
Dim b As Boolean = True
jo.RunMethod("setExpanded", Array As Object(b))
End Sub`
Instead of above following sub can be used:
' Show an expanded titledpane
' Parameter Pane: The pane to give focus and expand
`Sub showTitledPane(p As Node)
p.RequestFocus
Dim jo As JavaObject = p
Dim b As Boolean = True
jo.RunMethod("setExpanded", Array As Object(b))
End Sub`
' Examples calling
showTitledPane(titledpaneView)
showTitledPane(titledpaneManage)

Changed: , Category: Panes, File: T6C230M1697.htm, ID: 1697