B4J Library MultiRow TabPane

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.

upload_2017-10-17_8-58-6.png

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
  • Properties:
    • SelectedIndex As Int
      Get / Set the currently selected index

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

  • MultiRowTabPaneDemo1-1.zip
    9.3 KB · Views: 517
Last edited:

moster67

Expert
Licensed User
Longtime User
Hi Steve,
It seems like the sources of the wrapped panes are not included in the zip-file.
 
Top