Tabs

Inherits: Control < CanvasItem < Node < Object

Category: Core

Brief Description

Tabs Control.

Methods

void add_tab ( String title=”“, Texture icon=null )
void ensure_tab_visible ( int idx )
bool get_offset_buttons_visible ( ) const
bool get_select_with_rmb ( ) const
int get_tab_count ( ) const
bool get_tab_disabled ( int tab_idx ) const
Texture get_tab_icon ( int tab_idx ) const
int get_tab_offset ( ) const
Rect2 get_tab_rect ( int tab_idx ) const
String get_tab_title ( int tab_idx ) const
int get_tabs_rearrange_group ( ) const
void move_tab ( int from, int to )
void remove_tab ( int tab_idx )
void set_select_with_rmb ( bool enabled )
void set_tab_disabled ( int tab_idx, bool disabled )
void set_tab_icon ( int tab_idx, Texture icon )
void set_tab_title ( int tab_idx, String title )
void set_tabs_rearrange_group ( int group_id )

Theme Properties

StyleBox button
StyleBox button_pressed
Texture close
Texture decrement
Texture decrement_highlight
Font font
Color font_color_bg
Color font_color_disabled
Color font_color_fg
int hseparation
Texture increment
Texture increment_highlight
int label_valign_bg
int label_valign_fg
StyleBox panel
StyleBox tab_bg
StyleBox tab_fg
int top_margin

Signals

  • reposition_active_tab_request ( int idx_to )
  • right_button_pressed ( int tab )
  • tab_changed ( int tab )
  • tab_clicked ( int tab )
  • tab_close ( int tab )
  • tab_hover ( int tab )

Enumerations

enum CloseButtonDisplayPolicy:

  • CLOSE_BUTTON_SHOW_NEVER = 0
  • CLOSE_BUTTON_SHOW_ACTIVE_ONLY = 1
  • CLOSE_BUTTON_SHOW_ALWAYS = 2
  • CLOSE_BUTTON_MAX = 3

enum TabAlign:

  • ALIGN_LEFT = 0
  • ALIGN_CENTER = 1
  • ALIGN_RIGHT = 2
  • ALIGN_MAX = 3

Description

Simple tabs control, similar to TabContainer but is only in charge of drawing tabs, not interact with children.

Property Descriptions

  • int current_tab
Setter set_current_tab(value)
Getter get_current_tab()
  • bool drag_to_rearrange_enabled
Setter set_drag_to_rearrange_enabled(value)
Getter get_drag_to_rearrange_enabled()
  • bool scrolling_enabled
Setter set_scrolling_enabled(value)
Getter get_scrolling_enabled()
Setter set_tab_align(value)
Getter get_tab_align()
Setter set_tab_close_display_policy(value)
Getter get_tab_close_display_policy()

Method Descriptions

  • void ensure_tab_visible ( int idx )
  • bool get_offset_buttons_visible ( ) const
  • bool get_select_with_rmb ( ) const
  • int get_tab_count ( ) const
  • bool get_tab_disabled ( int tab_idx ) const
  • int get_tab_offset ( ) const
  • Rect2 get_tab_rect ( int tab_idx ) const

Returns tab Rect2 with local position and size.

  • int get_tabs_rearrange_group ( ) const
  • void move_tab ( int from, int to )

Rearrange tab.

  • void remove_tab ( int tab_idx )
  • void set_select_with_rmb ( bool enabled )
  • void set_tab_disabled ( int tab_idx, bool disabled )
  • void set_tab_title ( int tab_idx, String title )
  • void set_tabs_rearrange_group ( int group_id )