Here's something I needed and thought I'd share. Based on a FlowPane and A StackPane (minimal wraps for these and ToggleGroup are included in the source code).
Implemented as a customview, buttons can be at the Top or Bottom.
All source code is included so you can modify it as you like.
Important: You need to include the sub AddMultiTab(...) in the module in which you create the Tabpane so that the events from nodes added to the pane from the layout are returned to that module.
Update: 1.1 Changed the two callsub3 in Btn_Action and setSelectedIndex to CallSubDelayed3 to avoid the possibility of missing RaiseSynchroniousEvents errors. You can just change these in the existing code if you don't want to download the project again.
10
Implemented as a customview, buttons can be at the Top or Bottom.
MultiRowTabPane
- Events:
- TabChanged (Text As String, UserChanged As Boolean)
- Functions:
- AddTab (Text As String, Pn As Pane) As String
Provide a name for the tab and a Pane with the layout already loaded. - Class_Globals As String
- DesignerCreateView (Base As Pane, Lbl As Label, Props As Map) As String
- GetBase As Pane
get the base pane of the custom view - GetEnabled (Text As String) As Boolean
Get a tab's enabled state - getSelectedIndex As Int
- HideTab (Text As String) As String
- Initialize (Callback As Object, EventName As String) As String
- IsInitialized As Boolean
Tests whether the object has been initialized. - SetEnabled (Text As String, Enabled As Boolean) As Boolean
Set a Tab's Enabled state - setSelectedIndex (Index As Int) As String
Get / Set the currently selected index - ShowTab (Text As String) As String
- Size As Int
Get the count of tabs
- AddTab (Text As String, Pn As Pane) As String
- Properties:
- SelectedIndex As Int
Get / Set the currently selected index
- SelectedIndex As Int
All source code is included so you can modify it as you like.
Important: You need to include the sub AddMultiTab(...) in the module in which you create the Tabpane so that the events from nodes added to the pane from the layout are returned to that module.
Update: 1.1 Changed the two callsub3 in Btn_Action and setSelectedIndex to CallSubDelayed3 to avoid the possibility of missing RaiseSynchroniousEvents errors. You can just change these in the existing code if you don't want to download the project again.
10
Attachments
Last edited: