Difference between revisions of "LavishGUI:tabcontrol (Element Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
 
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
 
=== What is a Tab Control? ===
 
=== What is a Tab Control? ===
 +
A tab control is a collection of frames, one of which is visible.  Tabs are placed along the top edge of the control, with the selected frame visible below. [[LavishGUI:lguitabcontrol_%28Data_Type%29|lguitabcontrol (Data Type)]] and [[LavishGUI:lguitab_%28Data_Type%29|lguitab (Data Type)]] are used to provide access via LavishScript.
  
 
== Using Tab Controls ==
 
== Using Tab Controls ==
Line 6: Line 7:
  
 
=== Tab Control-Specific Properties ===
 
=== Tab Control-Specific Properties ===
 +
*'''BackgroundColor'''
 +
: Background color
 +
*'''Border'''
 +
: Size of border around the element. This border is included in the size of the element
 +
*'''BorderColor'''
 +
: Border color
 +
*'''Draggable'''
 +
: Enable if the user can reorder the tabs at the top by dragging (why not?)
 +
*'''Font'''
 +
: Font reference (Name, Size, Color)
 +
*'''FrameBackgroundColor'''
 +
: Background color for the frame (currently displayed tab page)
 +
*'''FrameBorder'''
 +
: Size of border around the frame (currently displayed tab page). This border is included in the size of the frame
 +
*'''FrameBorderColor'''
 +
: Border color for the frame (currently displayed tab page)
 +
*'''FrameTexture'''
 +
: Texture used for the frame (currently displayed tab page)
 +
*'''LeftTexture'''
 +
: Left button texture
 +
*'''LeftHoverTexture'''
 +
: Left button texture when hovering
 +
*'''LeftPressedTexture'''
 +
: Left button texture when pressed
 +
*'''RightTexture'''
 +
: Right button texture
 +
*'''RightHoverTexture'''
 +
: Right button texture when hovering
 +
*'''RightPressedTexture'''
 +
: Right button texture when pressed
 +
*'''SelectedTextColor'''
 +
: Text color for the currently selected tab (button)
 +
*'''TabBorder'''
 +
: Tab (button) border
 +
*'''TabHeight'''
 +
: Tab (button) height
 +
*'''TabTexture'''
 +
: Normal tab (button) texture
 +
*'''TabSelectedTexture'''
 +
: Selected tab (button) texture
 +
*'''Tabs'''
 +
: Container element for the tabs, treat them like the <Children> of a <[[LavishGUI:frame (Element Type)|Frame]]>
 +
==== Embedded Script ====
 +
*'''OnSelect'''
 +
: Executes when a new tab is selected.  Integer variable '''ID''' contains the ID of the newly selected tab.
  
 
== Examples ==
 
== Examples ==
 
+
===Example code===
 +
  <TabControl Name='my tab control'>
 +
  <TabHeight>100</TabHeight>
 +
    <Tabs>
 +
      <Tab Name='My Tab'>
 +
        <Button Name='My Button'>
 +
        </Button>
 +
      </Tab>
 +
      <Tab Name='Second Tab'>
 +
        <Button Name='My Button'>
 +
        </Button>
 +
      </Tab>
 +
    </Tabs>
 +
  </TabControl>
 
== See Also ==
 
== See Also ==
 +
* [[LavishGUI:lguitabcontrol_%28Data_Type%29|lguitabcontrol (Data Type)]]
 +
* [[LavishGUI:lguitab_%28Data_Type%29|lguitab (Data Type)]]
 
* [[LavishGUI]]
 
* [[LavishGUI]]
 
* [[LavishGUI:Elements|Elements]]
 
* [[LavishGUI:Elements|Elements]]
 
[[Category:LavishGUI]]
 
[[Category:LavishGUI]]

Latest revision as of 10:15, 17 May 2007

Introduction

What is a Tab Control?

A tab control is a collection of frames, one of which is visible. Tabs are placed along the top edge of the control, with the selected frame visible below. lguitabcontrol (Data Type) and lguitab (Data Type) are used to provide access via LavishScript.

Using Tab Controls

Tab Controls are descendants of the base element type. Any attributes of the base element type may be applied in addition to the tab control-specific properties described below.

Tab Control-Specific Properties

  • BackgroundColor
Background color
  • Border
Size of border around the element. This border is included in the size of the element
  • BorderColor
Border color
  • Draggable
Enable if the user can reorder the tabs at the top by dragging (why not?)
  • Font
Font reference (Name, Size, Color)
  • FrameBackgroundColor
Background color for the frame (currently displayed tab page)
  • FrameBorder
Size of border around the frame (currently displayed tab page). This border is included in the size of the frame
  • FrameBorderColor
Border color for the frame (currently displayed tab page)
  • FrameTexture
Texture used for the frame (currently displayed tab page)
  • LeftTexture
Left button texture
  • LeftHoverTexture
Left button texture when hovering
  • LeftPressedTexture
Left button texture when pressed
  • RightTexture
Right button texture
  • RightHoverTexture
Right button texture when hovering
  • RightPressedTexture
Right button texture when pressed
  • SelectedTextColor
Text color for the currently selected tab (button)
  • TabBorder
Tab (button) border
  • TabHeight
Tab (button) height
  • TabTexture
Normal tab (button) texture
  • TabSelectedTexture
Selected tab (button) texture
  • Tabs
Container element for the tabs, treat them like the <Children> of a <Frame>

Embedded Script

  • OnSelect
Executes when a new tab is selected. Integer variable ID contains the ID of the newly selected tab.

Examples

Example code

 <TabControl Name='my tab control'>
 <TabHeight>100</TabHeight>
   <Tabs>
     <Tab Name='My Tab'>
        <Button Name='My Button'>
        </Button>
     </Tab>
     <Tab Name='Second Tab'>
        <Button Name='My Button'>
        </Button>
     </Tab>
   </Tabs>
 </TabControl>

See Also