Index
The Tabcontrol and how to create it
The Parameters
Tabcontrol Functions
Important Info

The Tabcontrol and how to create it

The Tabcontrol inherits from the control class. It is one of the many ways for an application to output information to the application. A Tabcontrol is
common in GUI applications as a way to display data in a confined space using "tabs".

--Tabcontrol:
f1 = form(10, 10, 100, 100, false, "Main", color.white, color.AirForceBlue, true, false, false, false, false, false, true, false)
tblT = {{text = "atab", selected = true, controls = {}, x, y}, {text = "btab", selected = false, controls = {}, x, y}, {text = "ctab", selected = false, controls = {}, x, y}} tb1 = tabcontrol(10, 15, 100, 100, tblT, f1)

The code is exactly how you would create a Tabcontrol. You must have a form created in order to store your Tabcontrol, as with any other derivative of
the control class. As always you can declare any class two ways and if you dont remember how, read the forms reference here: Forms
The image below shows what the Tabcontrol declared above looks like.
The Table format is: {string text, bool selected, table controls, int x, in ty}. It must look similar to tblT above.

Figure 16:

Numeric UD Image

The Parameters

The Tabcontrol parameters are as follows:

Parameter Description
int x The x location of the Tabcontrol on the screen.
int y The y location of the tabcontrol on the screen. Actualy is about 15 below tabstrip, need to fix it.
int width The width of the tabcontrol.
int height The height of the tabcontrol.
table Control table Holds the pointer to the control table, or the control table itself.
form parent The form that the Tabcontrol will be visible on.

If you dont know the keywords, go here: Forms

Tabcontrol Functions

Here are the diffrent functions that you can call that do something with Tabcontrols:

Function Description Call example
addTab("text") Adds a tab to the tabstrip. tabcontrol_name:addTab("example")
removeTab(index) Removes the tab at a certain index. tabcontrol_name:removeTab(1)

Important Info

I still have to add a few things to this class, but it is nearing completion and shouldnt change too drasticly.