ReGui
  • Introduction
  • Getting Started
    • Installing
    • Creating windows
  • Plugins
    • Custom elements
    • Custom flags
    • Custom themes
  • Examples
    • Demo window
    • Example scripts
  • Methods
  • ReGui functions
  • Canvas functions
  • Configuration saving
  • Elements
    • :Label
    • :Error
    • Code Editor
    • :Button
    • :SmallButton
    • :RadioButton
    • :Image
    • :VideoPlayer
    • :Checkbox
    • :Radiobox
    • :Viewport
    • :Console
    • :Region
    • :List
    • :CollapsingHeader
    • :TreeNode
    • :Separator
    • :Indent
    • :BulletText
    • :Bullet
    • :Row
    • :SliderInt
    • :SliderFloat
    • :SliderEnum
    • :SliderColor3
    • :SliderCFrame
    • :SliderProgress
    • :DragInt
    • :DragFloat
    • :DragColor3
    • :DragCFrame
    • :InputText
    • :InputTextMultiline
    • :InputInt
    • :InputColor3
    • :InputCFrame
    • :ProgressBar
    • :Combo
    • :Keybind
    • :PlotHistogram
    • :Table
    • :TabSelector
    • :Window
    • :TabsWindow
    • :PopupModal
Powered by GitBook
On this page
  • Example usage:
  • Theme colors:
  1. Elements

:TabSelector

Previous:TableNext:Window

Last updated 2 months ago

type Tab = {
	Name: string,
	Focused: boolean?,
	AutoSize: string?,
	TabButton: boolean?,
	Closeable: boolean?,
	OnClosure: (Tab) -> nil,
	Icon: (string|number)?
}

type TabSelector = {
	NoTabsBar: boolean?,
	NoAnimation: boolean?,
	AutoSelectNewTabs: boolean?,
	OnActiveTabChange: ((Tab: Tab, Previous: Tab) -> nil)?,

	CreateTab: (TabsBox, Tab) -> Elements,
	RemoveTab: (TabsBox, Target: (table|string)) -> nil,
	SetActiveTab: (TabsBox, Target: (table|string)) -> nil,
}

Example usage:

local TabSelector = ...:TabSelector()
		
local Names = {"Avocado", "Broccoli", "Cucumber"}
for _, Name in Names do
	local Tab = TabSelector:CreateTab({Name = Name}) --> Canvas
	
	Tab:Label({
		Text = `This is the {Name} tab!`
	})
end

Theme colors:

Tag
Affects

TabsBarBg

Background color of tabs bar

TabsBarBgTransparency

Background transparency of tabs bar

Text

Text color

TextFont

Text font

TextSize

Text font size

TabPagePadding

Page padding

TabBgActive

Active tab button background color

TabTextActive

Active tab button text color

Preview