A container that show each chidren in a separate tab.
var libui = require('libui');
var win = new libui.UiWindow('UiTab example', 640, 480, true);
var widget = new libui.UiTab();
win.setChild(widget);
win.onClosing(function () {
win.close();
libui.stopLoop();
});
win.show();
libui.startLoop();
new libui.UiTab()
Create a new UiTab object.
See properties implementation for generic details on how properties are implemented.
Whether the widget should be visible or hidden.
Read write.
Defaults to true
.
Whether the widget should be enabled or disabled.
Read write.
Defaults to true
.
Append a new child widget as last tab.
Arguments
- label: String - the text to show in the new tab caption.
- control: UiControl - the control to append.
Insert a new child widget before specified position.
Arguments
- label: String - the text to show in the new tab caption.
- before: Number - the control will be inserted before this position
- control: UiControl - the control to insert.
Remove the tab and widget at specified position.
Arguments
- index: Number - the index of the tab to remove.
Specifies that a tab should use a margin around its content.
Arguments
- page: Number - the index of the tab.
- margined: Boolean - whether to display a margin or not.
Return a boolean that indicate if a tab is displaying a margin around its content.
Arguments
- page: Number - the index of the tab.
Return the total number of tab pages contained in the widgets.
Destroy and free the control.
Change the parent of the control
Arguments
- parent: UiControl - the new parent of the widget or null to detach it.
Return whether the control is a top level one or not.
Set the value of property visible
Arguments
- value: Boolean - The new value for
visible
property.
Return the value of property visible
Set the value of property enabled
Arguments
- value: Boolean - The new value for
enabled
property.
Return the value of property enabled