Blitz3D+ Command Reference

CreateTabber ( x,y,width,height,group[,style] )

Parameters

x,y - position of the tabber's top-left corner within the group's client area

width,height - size of the tabber

group - window or gadget group that owns the tabber

style (optional) - 0 (default); other values are reserved

Description

Creates a tabber gadget with a strip of selectable tabs, and returns its handle.

Requires Extended language mode.

A tabber packs several pages of controls into one spot - Properties, Materials, Physics tabs on an inspector. Each tab is an item: add them with AddGadgetItem (icons from a SetGadgetIconStrip strip work too), count them with CountGadgetItems, and switch from code with SelectGadgetItem.

The tabber is also a group: create child gadgets inside it, and they live in the page area below the tab strip, which ClientWidth and ClientHeight measure. There is one shared page area rather than one per tab, so the usual pattern is to keep a set of gadgets per tab and flip them with ShowGadget and HideGadget when the selection changes.

When the user clicks a tab, the tabber posts a critical gadget-action event ($401) with the new tab index in EventData; read the current tab any time with SelectedGadgetItem.

The world editor shell sample shows the editor layout style tabbers slot into.

See also: AddGadgetItem, SelectedGadgetItem, SelectGadgetItem, ShowGadget, HideGadget, ClientWidth.

Index