Exontrol.ExTab - Information, Features

ExTab

The Exontrol ExTab component is a SKIN based TAB control. A tab control is analogous to the dividers in a notebook or the labels in a file cabinet. By using a tab control, an application can define multiple pages for the same area of a form or dialog box. Each page consists of a certain type of information or a group of controls that the application displays when the user selects the corresponding tab. The Exontrol ExTab library includes two components: TabBuilder and Tab components. The TabBuilder component helps to edit, create skin tab files using a WYSWYG editor. The Tab control can use any skin file created using the TabBuilder component.

Features include:

  • 10 predefined TAB styles
  • WYSWYG Template/Layout Editor support
  • Built-in HTML support
  • Hot-Colors support
  • Multiple HTML lines tooltip support
  • Ability to scroll pages
  • Ability to insert new controls in any page at the design mode as well as at runtime mode
  • Ability to show or hide tabs
  • Ability to change the position for any page
  • Fully customizable

® ExTab is a trademark of Exontrol. All Rights Reserved.

Tutorials include:

  • Did you try the TabBuilder?

  • How to build my own tab?

  • How do I add new pages on design mode?

Listed on the FAQ page are the questions that we are asked quite often about exTab component.


Exontrol - Support

How to get support?

To keep your business applications running, you need support you can count on.

Here are few hints what to do when you're stuck on your programming:

  • Check out the samples - they are here to provide some quick info on how things should be done
  • Check out the how-to questions using the eXHelper tool
  • Check out the help - includes documentation for each method, property or event
  • Check out if you have the latest version, and if you don't have it send an update request here.
  • Submit your problem(question) here.

Don't forget that you can contact our development team if you have ideas or requests for new components, by sending us an e-mail at support@exontrol.com ( please include the name of the product in the subject, ex: exgrid ) . We're sure our team of developers will try to find a way to make you happy - and us too, since we helped.

Regards,
Exontrol Development Team

https://www.exontrol.com


constants CaptionAlignEnum
The CaptionAlignEnum type specifies the horizontal and vertical alignment for the caption to be shown on the pages part of the control. The CaptionAlignment property specifies the horizontal and vertical alignment for the control's caption.

Name | Value | Description
exUpperLeft | 0 | Aligns the caption to the upper left corner.
exUpperCenter | 1 | Centers the caption on the upper edge.
exUpperRight | 2 | Aligns the caption to the upper right corner.
exMiddleLeft | 16 | Aligns horizontally the caption on the left side, and centers the caption vertically.
exMiddleCenter | 17 | Puts the caption on the center of the source.
exMiddleRight | 18 | Aligns horizontally the caption on the right side, and centers the caption vertically.
exLowerLeft | 32 | Aligns the caption to the lower left corner.
exLowerCenter | 33 | Centers the caption on the lower edge.
exLowerRight | 34 | Aligns the caption to the lower right corner.


constants TabStyleEnum

Here's the list of predefined styles:

Name | Value | Description
exCustom | -1 | The TAB control was edited, and the skin content is saved to form's persistence.
exVcpp | 1 |
exHotmail | 2 |
exProperty | 3 |
exRound | 4 |
exTabbed | 5 |
exUnix | 6 |
exXp | 7 |
exSimple | 8 |
exRound2 | 9 |
exChrome | 10 |


Page object
A Page object holds information about a tab in the control. The control displays only the visible page objects. Use the Pages property to access the control's pages collection.

Name | Description
Caption | Specifies the page's caption.
Controls | Specifies the list of controls in the page.
Enabled | Enables or disables a page.
Image | Specifies a value that indicates the index of page's icon.
Key | Specifies the page's key.
Position | Specifies the page's position.
ToolTip | Specifies the description of the page's tooltip.
ToolTipTitle | Specifies the title of the page's tooltip.
UserData | Associates an extra data to the page.
Visible | Shows or hides the page.


property Caption

property Page.Caption as String
Specifies the page's caption.

Type | Description
String | A string expression that indicates the page's caption. The page's caption may contain any combination of built-in HTML tags.

Use the Caption property to define the caption of the page. Use the UserData property to associate an extra data to the page. Use the Key property to define the key of the page. The Item property uses the Key of the page when user looks for a page. You can assign a caption to a page when you insert a new page to the control by using the Add method. The Caption property specifies the HTML caption to be displayed in the control's pages part.

Here's the list of supported built-in HTML tags:

  • <b> ... </b> displays the text in bold
  • <i> ... </i> displays the text in italics
  • <u> ... </u> underlines the text
  • <s> ... </s> Strike-through text
  • <a id;options> ... </a> displays an anchor element that can be clicked. An anchor is a piece of text or some other object (for example an image) which marks the beginning and/or the end of a hypertext link.The <a> element is used to mark that piece of text (or inline image), and to give its hypertextual relationship to other documents. The control fires the AnchorClick(AnchorID, Options) event when the user clicks the anchor element. The FormatAnchor property customizes the visual effect for anchor elements.
  • <font face;size> ... </font> displays portions of text with a different font and/or different size. For instance, the <font Tahoma;12>bit</font> draws the bit text using the Tahoma font, on size 12 pt. If the name of the font is missing, and instead size is present, the current font is used with a different size. For instance, <font ;12>bit</font> displays the bit text using the current font, but with a different size.
  • <fgcolor rrggbb> ... </fgcolor> or <fgcolor=rrggbb> ... </fgcolor> displays text with a specified foreground color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <bgcolor rrggbb> ... </bgcolor> or <bgcolor=rrggbb> ... </bgcolor> displays text with a specified background color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <solidline rrggbb> ... </solidline> or <solidline=rrggbb> ... </solidline> draws a solid-line on the bottom side of the current text-line, of specified RGB color. The <solidline> ... </solidline> draws a black solid-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <dotline rrggbb> ... </dotline> or <dotline=rrggbb> ... </dotline> draws a dot-line on the bottom side of the current text-line, of specified RGB color. The <dotline> ... </dotline> draws a black dot-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <upline> ... </upline> draws the line on the top side of the current text-line (requires <solidline> or <dotline>).
  • <r> right aligns the text
  • <c> centers the text
  • <br> forces a line-break
  • <img>number[:width]</img> inserts an icon inside the text. The number indicates the index of the icon being inserted. Use the Images method to assign a list of icons to your chart. The last 7 bits in the high significant byte of the number expression indicates the identifier of the skin being used to paint the object. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the part. The width is optional and indicates the width of the icon being inserted. Using the width option you can overwrite multiple icons getting a nice effect. By default, if the width field is missing, the width is 18 pixels.
  • <img>key[:width]</img> inserts a custom size picture into the text being previously loaded using the HTMLPicture property. The Key parameter indicates the key of the picture being displayed. The Width parameter indicates a custom size, if you require to stretch the picture, else the original size of the picture is used.
  • & glyph characters as &amp; ( & ), &lt; ( < ), &gt; ( > ), &qout; ( " ) and &#number; ( the character with specified code ), For instance, the &#8364; displays the EUR character. The & ampersand is only recognized as markup when it is followed by a known letter or a #character and a digit. For instance if you want to display <b>bold</b> in HTML caption you can use &lt;b&gt;bold&lt;/b&gt;
  • <off offset> ... </off> defines the vertical offset to display the text/element. The offset parameter defines the offset to display the element. This tag is inheritable, so the offset is keep while the associated </off> tag is found. You can use the <off offset> HTML tag in combination with the <font face;size> to define a smaller or a larger font to be displayed. For instance: Text with <font ;7><off 6>subscript displays the text such as: Text with subscript The Text with <font ;7><off -6>superscript displays the text such as: Text with subscript
  • <gra rrggbb;mode;blend> ... </gra> defines a gradient text. The text color or <fgcolor> defines the starting gradient color, while the rr/gg/bb represents the red/green/blue values of the ending color, 808080 if missing as gray. The mode is a value between 0 and 4, 1 if missing, and blend could be 0 or 1, 0 if missing. The <font> HTML tag can be used to define the height of the font. Any of the rrggbb, mode or blend field may not be specified. The <gra> with no fields, shows a vertical gradient color from the current text color to gray (808080). For instance the <font ;18><gra FFFFFF;1;1>gradient-center</gra></font> generates the following picture:
  • <out rrggbb;width> ... </out> shows the text with outlined characters, where rr/gg/bb represents the red/green/blue values of the outline color, 808080 if missing as gray, width indicates the size of the outline, 1 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><out 000000><fgcolor=FFFFFF>outlined</fgcolor></out></font> generates the following picture:
  • <sha rrggbb;width;offset> ... </sha> define a text with a shadow, where rr/gg/bb represents the red/green/blue values of the shadow color, 808080 if missing as gray, width indicates the size of shadow, 4 if missing, and offset indicates the offset from the origin to display the text's shadow, 2 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><sha>shadow</sha></font> generates the following picture:

    or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:

For instance, the following expression "<b> Tab </b> <fgcolor=0000FF>1</fgcolor>" looks like: "Tab 1"


property Controls

property Page.Controls as String
Specifies the list of controls in the page.

Type | Description
String | A String expression that indicates the list of controls hosted in a page. The list is separated by comma.
Use the Controls property to specify the list of controls ( the name of the controls ), that belongs to a page, when the environment doesn't support the ISimpleFrameSite interface.

For instance, the MS Access. .NET environment do not support the ISimpleFrameSite interface, so in these cases the controls must be specified by code using the Controls property. The following sample uses the Template property to specify the controls at design time, like follows:

Pages
{
    Add("Tab 1", "Tab1", 1).Controls = "Calendar1"
    Add("Tab 2", "Tab2", 2)
    {
        Controls = "Chart1,List1"
    }
}

The template adds two pages, the first one hosts the Calendar1 control, and the second page contains the Chart1 and the List1 controls. When user clicks or activate a page, the control hides the components of the pages that are hidden, and shows the components of the page that's activated. The Activate event notifies your application when a new page is activated. The Active property specifies the page that's activated.

In .NET environment, the CContainer property should refer the .NET form that holds the controls to be displayed in the page. Use the Controls property to assign a list of controls being assigned to a page, so they get visible when the page is activated, and they are hidden as soon as the page is deactivated.

For instance, the following VB.NET sample shows how to distribute controls to different pages of the control:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    With AxTab1
        .CContainer = Me
        .Pages(0).Controls = "Button1,CheckBox1"
        .Pages(1).Controls = "Button2,CheckBox2"
    End With
End Sub

For instance, the following C# sample shows how to distribute controls to different pages of the control:

private void Form1_Load(object sender, EventArgs e)
{
    axTab1.CContainer = this;
    axTab1.Pages[0].Controls = "Button1,CheckBox1";
    axTab1.Pages[1].Controls = "Button2,CheckBox2";
}


property Enabled

property Page.Enabled as Boolean
Enables or disables a page.

Type | Description
Boolean | A boolean expression that indicates whether the page is enabled or disabled.

Use the Enabled property to disable a specified page. Use the Enabled property to disable the control. The user cannot select a disabled page.


property Image

property Page.Image as Long
Specifies a value that indicates the index of page's icon.

Type | Description
Long | A long expression that indicates the index of icon in the page. The index is 1 based.

Use the Image property to assign an icon to a page. Use the Images and ReplaceIcon methods to add/remove icons to the control at runtime. Use the ImageList panel to insert icon to the control at the design mode. The ShowImageList property determines whether the ImageList panel is visible or hidden. You can assign an icon index when you insert a new page to the control by using the Add method.


property Key

property Page.Key as String
Specifies the page's key.

Type | Description
String | A string expression that indicates the page's key.

Use the Key property to assign a key to a page. You can assign the page's key when a new page is inserted to the control by using the Add method. The Key property is used when Item property looks for a page. No error occurs if duplicate keys are using.


property Position

property Page.Position as Long
Specifies the page's position.

Type | Description
Long | A long expression that indicates the position of the page.

Use the Position property to specify the page's position. Use the Active property to activate a new page. An unique Key identifies a page.


property ToolTip

property Page.ToolTip as String
Specifies the description of the page's tooltip.

Type | Description
String | A string expression that indicates the page's tooltip.

The page's tooltip shows up if the cursor stays for while over the caption of the page. Use the ToolTipTitle property to specify the title for the page's tooltip. Use the ToolTipDelay and ToolTipPopDelay properties to specify the time in ms that a tooltip requires to show up. The ToolTip property supports the following HTML tags:

  • <b> ... </b> displays the text in bold
  • <i> ... </i> displays the text in italics
  • <u> ... </u> underlines the text
  • <s> ... </s> Strike-through text
  • <a id;options> ... </a> displays an anchor element that can be clicked. An anchor is a piece of text or some other object (for example an image) which marks the beginning and/or the end of a hypertext link.The <a> element is used to mark that piece of text (or inline image), and to give its hypertextual relationship to other documents. The control fires the AnchorClick(AnchorID, Options) event when the user clicks the anchor element. The FormatAnchor property customizes the visual effect for anchor elements.
  • <font face;size> ... </font> displays portions of text with a different font and/or different size. For instance, the <font Tahoma;12>bit</font> draws the bit text using the Tahoma font, on size 12 pt. If the name of the font is missing, and instead size is present, the current font is used with a different size. For instance, <font ;12>bit</font> displays the bit text using the current font, but with a different size.
  • <fgcolor rrggbb> ... </fgcolor> or <fgcolor=rrggbb> ... </fgcolor> displays text with a specified foreground color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <bgcolor rrggbb> ... </bgcolor> or <bgcolor=rrggbb> ... </bgcolor> displays text with a specified background color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <solidline rrggbb> ... </solidline> or <solidline=rrggbb> ... </solidline> draws a solid-line on the bottom side of the current text-line, of specified RGB color. The <solidline> ... </solidline> draws a black solid-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <dotline rrggbb> ... </dotline> or <dotline=rrggbb> ... </dotline> draws a dot-line on the bottom side of the current text-line, of specified RGB color. The <dotline> ... </dotline> draws a black dot-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <upline> ... </upline> draws the line on the top side of the current text-line (requires <solidline> or <dotline>).
  • <r> right aligns the text
  • <c> centers the text
  • <br> forces a line-break
  • <img>number[:width]</img> inserts an icon inside the text. The number indicates the index of the icon being inserted. Use the Images method to assign a list of icons to your chart. The last 7 bits in the high significant byte of the number expression indicates the identifier of the skin being used to paint the object. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the part. The width is optional and indicates the width of the icon being inserted. Using the width option you can overwrite multiple icons getting a nice effect. By default, if the width field is missing, the width is 18 pixels.
  • <img>key[:width]</img> inserts a custom size picture into the text being previously loaded using the HTMLPicture property. The Key parameter indicates the key of the picture being displayed. The Width parameter indicates a custom size, if you require to stretch the picture, else the original size of the picture is used.
  • & glyph characters as &amp; ( & ), &lt; ( < ), &gt; ( > ), &qout; ( " ) and &#number; ( the character with specified code ), For instance, the &#8364; displays the EUR character. The & ampersand is only recognized as markup when it is followed by a known letter or a #character and a digit. For instance if you want to display <b>bold</b> in HTML caption you can use &lt;b&gt;bold&lt;/b&gt;
  • <off offset> ... </off> defines the vertical offset to display the text/element. The offset parameter defines the offset to display the element. This tag is inheritable, so the offset is keep while the associated </off> tag is found. You can use the <off offset> HTML tag in combination with the <font face;size> to define a smaller or a larger font to be displayed. For instance: Text with <font ;7><off 6>subscript displays the text such as: Text with subscript The Text with <font ;7><off -6>superscript displays the text such as: Text with subscript
  • <gra rrggbb;mode;blend> ... </gra> defines a gradient text. The text color or <fgcolor> defines the starting gradient color, while the rr/gg/bb represents the red/green/blue values of the ending color, 808080 if missing as gray. The mode is a value between 0 and 4, 1 if missing, and blend could be 0 or 1, 0 if missing. The <font> HTML tag can be used to define the height of the font. Any of the rrggbb, mode or blend field may not be specified. The <gra> with no fields, shows a vertical gradient color from the current text color to gray (808080). For instance the <font ;18><gra FFFFFF;1;1>gradient-center</gra></font> generates the following picture:
  • <out rrggbb;width> ... </out> shows the text with outlined characters, where rr/gg/bb represents the red/green/blue values of the outline color, 808080 if missing as gray, width indicates the size of the outline, 1 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><out 000000><fgcolor=FFFFFF>outlined</fgcolor></out></font> generates the following picture:
  • <sha rrggbb;width;offset> ... </sha> define a text with a shadow, where rr/gg/bb represents the red/green/blue values of the shadow color, 808080 if missing as gray, width indicates the size of shadow, 4 if missing, and offset indicates the offset from the origin to display the text's shadow, 2 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><sha>shadow</sha></font> generates the following picture:

    or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:


property ToolTipTitle

property Page.ToolTipTitle as String
Specifies the title of the page's tooltip.

Type | Description
String | A string expression that indicates the title of the page's tooltip.

The page's tooltip shows up if the cursor stays for while over the caption of the page. Use the ToolTipTitle property to specify the title for the page's tooltip. Use the ToolTip property to specify the page's tooltip. Use the ToolTipDelay and ToolTipPopDelay properties to specify the time in ms that a tooltip requires to show up.


property UserData

property Page.UserData as Variant
Associates an extra data to the page.

Type | Description
Variant | A VARIANT value that indicates the extra data associated to the page.

Use the UserData property to associate an extra data to the page.


property Visible

property Page.Visible as Boolean
Shows or hides the page.

Type | Description
Boolean | A boolean expression that indicates whether the page is visible or hidden.

Use the Visible property to hide a page at runtime. Use the Position property to change the page's position.

Use the Template editor to hide a page at design time like in the following sample ( X-Language ):

Pages
{
    Add("Tab 2", "Tab2", 2)
    {
        Visible = False
    }
}


Pages object
The Pages object holds a collection of Page objects. Use the Pages property to access the control's Pages collection. The Pages object supports the following methods and properties:

Name | Description
Add | Adds a Page object to the collection and returns a reference to the newly created object.
Clear | Removes all objects in a collection.
Count | Returns the number of objects in the collection.
IndexToPos | Gets the page's position giving the page's index.
Item | Returns a specific Page of the Pages collection.
PosToIndex | Gets the page's index giving the page's position.
Remove | Removes a specific member from the Pages collection.


method Add

method Pages.Add (Caption as String, Key as String, [Image as Variant])
Adds a Page object to the collection and returns a reference to the newly created object.

Type | Description
Caption as String | A string expression that indicates the page's caption, which support built-in HTML format.
Key as String | A string expression that indicates the page's key. If the Key is empty, the caption is used by Item property instead.
Image as Variant | A long expression that indicates the index of page's icon
Return | Description
Page | A Page object being created.

Use the Add method to add new pages to the control. Use the Item property to access a Page object given its key, caption or index. Use the Template editor to add new pages to the control in design mode. For instance, the following sample adds two new pages to the control using X-Language:

Pages
{
    Add("Tab 1", "Tab1", 1)            ' Adds a page titled "Tab 1", that has the Key = "Tab1", and the Image = 1
    {
        UserData = "Associates an extra data to the page"
    }
    Add("Tab 2", "Tab2", 2)            ' Adds a page titled "Tab 2", that has the Key = "Tab2", and the Image = 2
    {
        UserData = "Associates an extra data to the page"
    }
}

Use the Add method at runtime only if you want to handle inside controls by yourself. As well, the Remove method should be used in the same manner. Use the Visible property if you need to hide a page.

The Caption parameter supports:

  • <b> ... </b> displays the text in bold
  • <i> ... </i> displays the text in italics
  • <u> ... </u> underlines the text
  • <s> ... </s> Strike-through text
  • <a id;options> ... </a> displays an anchor element that can be clicked. An anchor is a piece of text or some other object (for example an image) which marks the beginning and/or the end of a hypertext link.The <a> element is used to mark that piece of text (or inline image), and to give its hypertextual relationship to other documents. The control fires the AnchorClick(AnchorID, Options) event when the user clicks the anchor element. The FormatAnchor property customizes the visual effect for anchor elements.
  • <font face;size> ... </font> displays portions of text with a different font and/or different size. For instance, the <font Tahoma;12>bit</font> draws the bit text using the Tahoma font, on size 12 pt. If the name of the font is missing, and instead size is present, the current font is used with a different size. For instance, <font ;12>bit</font> displays the bit text using the current font, but with a different size.
  • <fgcolor rrggbb> ... </fgcolor> or <fgcolor=rrggbb> ... </fgcolor> displays text with a specified foreground color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <bgcolor rrggbb> ... </bgcolor> or <bgcolor=rrggbb> ... </bgcolor> displays text with a specified background color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <solidline rrggbb> ... </solidline> or <solidline=rrggbb> ... </solidline> draws a solid-line on the bottom side of the current text-line, of specified RGB color. The <solidline> ... </solidline> draws a black solid-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <dotline rrggbb> ... </dotline> or <dotline=rrggbb> ... </dotline> draws a dot-line on the bottom side of the current text-line, of specified RGB color. The <dotline> ... </dotline> draws a black dot-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <upline> ... </upline> draws the line on the top side of the current text-line (requires <solidline> or <dotline>).
  • <r> right aligns the text
  • <c> centers the text
  • <br> forces a line-break
  • <img>number[:width]</img> inserts an icon inside the text. The number indicates the index of the icon being inserted. Use the Images method to assign a list of icons to your chart. The last 7 bits in the high significant byte of the number expression indicates the identifier of the skin being used to paint the object. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the part. The width is optional and indicates the width of the icon being inserted. Using the width option you can overwrite multiple icons getting a nice effect. By default, if the width field is missing, the width is 18 pixels.
  • <img>key[:width]</img> inserts a custom size picture into the text being previously loaded using the HTMLPicture property. The Key parameter indicates the key of the picture being displayed. The Width parameter indicates a custom size, if you require to stretch the picture, else the original size of the picture is used.
  • & glyph characters as &amp; ( & ), &lt; ( < ), &gt; ( > ), &qout; ( " ) and &#number; ( the character with specified code ), For instance, the &#8364; displays the EUR character. The & ampersand is only recognized as markup when it is followed by a known letter or a #character and a digit. For instance if you want to display <b>bold</b> in HTML caption you can use &lt;b&gt;bold&lt;/b&gt;
  • <off offset> ... </off> defines the vertical offset to display the text/element. The offset parameter defines the offset to display the element. This tag is inheritable, so the offset is keep while the associated </off> tag is found. You can use the <off offset> HTML tag in combination with the <font face;size> to define a smaller or a larger font to be displayed. For instance: Text with <font ;7><off 6>subscript displays the text such as: Text with subscript The Text with <font ;7><off -6>superscript displays the text such as: Text with subscript
  • <gra rrggbb;mode;blend> ... </gra> defines a gradient text. The text color or <fgcolor> defines the starting gradient color, while the rr/gg/bb represents the red/green/blue values of the ending color, 808080 if missing as gray. The mode is a value between 0 and 4, 1 if missing, and blend could be 0 or 1, 0 if missing. The <font> HTML tag can be used to define the height of the font. Any of the rrggbb, mode or blend field may not be specified. The <gra> with no fields, shows a vertical gradient color from the current text color to gray (808080). For instance the <font ;18><gra FFFFFF;1;1>gradient-center</gra></font> generates the following picture:
  • <out rrggbb;width> ... </out> shows the text with outlined characters, where rr/gg/bb represents the red/green/blue values of the outline color, 808080 if missing as gray, width indicates the size of the outline, 1 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><out 000000><fgcolor=FFFFFF>outlined</fgcolor></out></font> generates the following picture:
  • <sha rrggbb;width;offset> ... </sha> define a text with a shadow, where rr/gg/bb represents the red/green/blue values of the shadow color, 808080 if missing as gray, width indicates the size of shadow, 4 if missing, and offset indicates the offset from the origin to display the text's shadow, 2 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><sha>shadow</sha></font> generates the following picture:

    or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:


method Clear

method Pages.Clear ()
Removes all objects in a collection.

Type Description

Use the Clear method to remove all pages in the control. We do not recommend using the Clear method at runtime, until you handle the controls inside the page. Use the Visible property to hide a page.


property Count

property Pages.Count as Long
Returns the number of objects in the collection.

Type | Description
Long | A long expression that specifies the number of pages in the TAB control.

The Count property counts the pages in the control.


property IndexToPos

property Pages.IndexToPos (Index as Long) as Long
Gets the page's position giving the page's index.

Type | Description
Index as Long | A long expression that indicates the index being converted.
Long | A long expression that indicates the position of converted index.

Use the IndexToPos property to convert indexes to positions. Some of the control properties like Active, returns position instead page's index, so the position needs to be converted to a index, if the Item property is used. Use the PosToIndex property to convert positions to indexes.


property Item

property Pages.Item (Index as Variant) as Page
Returns a specific Page of the Pages collection.

Type | Description
Index as Variant | A long expression that indicates index of page being accessed, a string expression that indicates the page's key or page's caption being searched.
Page | A Page object being returned.

The Item property is the default property for Pages object, so expressions like Pages.Item(x) and Pages(x) are equivalents. If the Pages collection contains multiple objects with the same key or caption, the first found is returned when passing a string to Index parameter. It is recommended using unique keys for the pages.


property PosToIndex

property Pages.PosToIndex (Position as Long) as Long
Gets the page's index giving the page's position.

Type | Description
Position as Long | A long expression that indicates the position being translated
Long | A long expression that indicates the converted index

Use the PosToIndex property to convert positions to indexes. Some of the control properties like Active, returns position instead page's index, so the position needs to be converted to a index, if the Item property is used. Use the IndexToPos property to convert indexes to positions.


method Remove

method Pages.Remove (Index as Variant)
Removes a specific member from the Pages collection.

Type | Description
Index as Variant | A long expression that indicates index of page being removed, a string expression that indicates the page's key or page's caption being removed.

Using the Remove method is not recommended unless you are handling the controls inside page. Use the Visible property to hide a page.


Tab object
Tip The /COM object can be placed on a HTML page (with usage of the HTML object tag: <object classid="clsid:...">) using the class identifier: {F3CE6846-4178-403F-912C-85C52307272E}. The object's program identifier is: "Exontrol.Tab". The /COM object module is: "ExTab.dll"
The Exontrol ExTab component is a skin based TAB control. A tab control is analogous to the dividers in a notebook or the labels in a file cabinet. By using a tab control, an application can define multiple pages for the same area of a form or dialog box. Each page consists of a certain type of information or a group of controls that the application displays when the user selects the corresponding tab. The Exontrol Tab component supports the following methods and properties:

Name | Description
Active | Specifies the active tab number.
AttachTemplate | Attaches a script to the current object, including the events, from a string, file, a safe array of bytes.
BackColor | Retrieves or sets a value that indicates the control's background color.
Caption | Specifies the HTML caption to be displayed on the pages part of the control.
CaptionAlignment | Specifies horizontal and vertical alignment of the caption to be shown.
CContainer | Specifies the control's container.
ClientHeight | Retrieves the height of the control's client area.
ClientLeft | Retrieves the distance between left edge of the control's client area and the left border of the control.
ClientTop | Retrieves the distance between top edge of the control's client area and the top border of the control.
ClientWidth | Retrieves the width of the control's client area.
ClosePopup | Closes the floating TAB control.
CustomStyle | Returns or sets a string expression that indicates the control's custom style as a file name to a ETB file, or encoded BASE64 string of the ETB file.
Enabled | Enables or disables the control.
EventParam | Retrieves or sets a value that indicates the current's event parameter.
ExecuteTemplate | Executes a template and returns the result.
FixedPageWidth | Specifies the fixed width of the page (the control displays the pages with same size)
Font | Retrieves or sets the control's font.
ForeColor | Retrieves or sets a value that indicates the control's foreground color.
HotBackColor | Retrieves or sets a value that indicates the hot-tracking background color.
HotForeColor | Retrieves or sets a value that indicates the hot-tracking foreground color.
HotObject | Retrieves or sets a value that indicates the index within current tab-skin, that changes its background while the cursor hovers the page.
HTMLPicture | Adds or replaces a picture in HTML captions.
hWnd | Retrieves the control's window handle.
Images | Sets at runtime the control's image list. The Handle should be a handle to an Image List Control.
ImageSize | Retrieves or sets the size of icons the control displays..
IsPopup | Specifies whether the TAB control is hosted by a popup window.
LeftPictureRoot | Specifies the indent of the picture on the root object.
Load | Loads the tab skin file.
PageFromPoint | Retrieves the number of the page over the point.
Pages | Gets the pages collection.
Popup | Floats the tab control to a popup window.
PopupVisible | Specifies whether the floating TAB control is visible or hidden.
Refresh | Refreshes the control.
ReplaceIcon | Adds a new icon, replaces an icon or clears the control's image list.
SelectEnablePageIfDisable | Specifies a value that indicates whether the control selects an enabled page if the focused page is disabled.
ShowFocusRect | Specifies whether the control marks the focused page tab.
ShowImageList | Specifies whether the control's image list window is visible or hidden.
ShowScroll | Specifies whether the control displays a scroll button when required.
ShowToolTip | Shows the specified tooltip at given position.
Style | Specifies the style of the tab control from a list of predefined styles.
TabAutoResize | Specifies whether the pages are auto arranged to fit the control's client area.
Template | Specifies the control's template.
TemplateDef | Defines inside variables for the next Template/ExecuteTemplate call.
TemplatePut | Defines inside variables for the next Template/ExecuteTemplate call.
ToolTipDelay | Specifies the time in ms that passes before the ToolTip appears.
ToolTipFont | Retrieves or sets the tooltip's font.
ToolTipPopDelay | Specifies the period in ms of time the ToolTip remains visible if the mouse pointer is stationary within a control.
ToolTipWidth | Specifies a value that indicates the width of the tooltip window, in pixels.
TopPictureRoot | Specifies the indent of the picture on the root object.
Version | Retrieves the control's version.


property Active

property Tab.Active as Long
Specifies the active tab number.

Type | Description
Long | A long expression that indicates the position of the focused ( activated ) page.

The Active property specifies the position of the page being activated. If you didn't use the Position property to change the position of the pages, the index and positions are identical so position can be used when accessing a page using the Item property. If you are using Position property to change the position of the pages, the properties like: IndexToPos and PosToIndex should be used before passing the argument to the Item property. The Activate event is fired when a new page is focused ( activated ).

The following sample displays the caption of focused page no matter if the Position property was used:

    Tab1.Pages(Tab1.Pages.PosToIndex(Tab1.Active)).Caption


method AttachTemplate

method Tab.AttachTemplate (Template as Variant)
Attaches a script to the current object, including the events, from a string, file, a safe array of bytes.

Type | Description
Template as Variant | A string expression that specifies the Template to execute.
The AttachTemplate/x-script code is a simple way of calling control/object's properties, methods/events using strings. The AttachTemplate features allows you to attach a x-script code to the component. The AttachTemplate method executes x-script code ( including events ), from a string, file or a safe array of bytes. This feature allows you to run any x-script code for any configuration of the component /COM, /NET or /WPF. Exontrol owns the x-script implementation in its easiest form and it does not require any VB engine or whatever to get executed. The x-script code can be converted to several programming languages using the eXHelper tool.

The following sample opens the Windows Internet Explorer once the user clicks the control ( /COM version ):

AttachTemplate("handle Click(){ CreateObject(`internetexplorer.application`){ Visible = True; Navigate(`https://www.exontrol.com`) } } ")

This script is equivalent with the following VB code:

Private Sub Tab1_Click()
    With CreateObject("internetexplorer.application")
        .Visible = True
        .Navigate ("https://www.exontrol.com")
    End With
End Sub

The AttachTemplate/x-script syntax in BNF notation is defined like follows:

<x-script> := <lines>
<lines> := <line>[<eol> <lines>] | <block>
<block> := <call> [<eol>] { [<eol>] <lines> [<eol>] } [<eol>]
<eol> := ";" | "\r\n"
<line> := <dim> | <createobject> | <call> | <set> | <comment> | <handle>[<eol>]{[<eol>]<lines>[<eol>]}[<eol>]
<dim> := "DIM" <variables>
<variables> := <variable> [, <variables>]
<variable> := "ME" | <identifier>
<createobject> := "CREATEOBJECT(`"<type>"`)"
<call> := <variable> | <property> | <variable>"."<property> | <createobject>"."<property>
<property> := [<property>"."]<identifier>["("<parameters>")"]
<set> := <call> "=" <value>
<property> := <identifier> | <identifier>"("[<parameters>]")"
<parameters> := <value> [","<parameters>]
<value> := <boolean> | <number> | <color> | <date> | <string> | <createobject> | <call>
<boolean> := "TRUE" | "FALSE"
<number> := "0X"<hexa> | ["-"]<integer>["."<integer>]
<digit10> := 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<digit16> := <digit10> | A | B | C | D | E | F
<integer> := <digit10>[<integer>]
<hexa> := <digit16>[<hexa>]
<color> := "RGB("<integer>","<integer>","<integer>")"
<date> := "#"<integer>"/"<integer>"/"<integer>" "[<integer>":"<integer>":"<integer>"]"#"
<string> := '"'<text>'"' | "`"<text>"`"
<comment> := "'"<text>
<handle> := "handle " <event>
<event> := <identifier>"("[<eparameters>]")"
<eparameters> := <eparameter> [","<eparameters>]
<parameters> := <identifier>

where:

<identifier> indicates an identifier of the variable, property, method or event, and should start with a letter.
<type> indicates the type the CreateObject function creates, as a progID for /COM version or the assembly-qualified name of the type to create for /NET or /WPF version
<text> any string of characters

The Template or x-script is composed by lines of instructions. Instructions are separated by "\n\r" ( newline characters ) or ";" character.

The advantage of the AttachTemplate relative to Template / ExecuteTemplate is that the AttachTemplate can add handlers to the control events.


property BackColor

property Tab.BackColor as Color
Retrieves or sets a value that indicates the control's background color.

Type | Description
Color | A color expression that indicates the control's background color.

The BackColor property changes the control's background color. It is important to notice that the BackColor property updates the background's control depending on the skin loaded. What that means? If your skin tab defines for all objects a color, the BackColor property will have no effect. Instead, if your skin contains visible objects that have no color associated, the BackColor property will have effect. Use the ForeColor property to change the control's foreground color. Use the <fgcolor> and <bgcolor> built-in HTML tags, in the Caption property to apply different colors for the pages.


property Caption

property Tab.Caption as String
Specifies the HTML caption to be displayed on the pages part of the control.

Type | Description
String | A string expression that indicates the page's caption. The page's caption may contain any combination of built-in HTML tags.

Use the Caption property to define the caption of the control. The caption of the control is displayed on the pages part of the control like in the following screen shot. The CaptionAlignment property specifies the horizontal and vertical alignment of the control's caption. The Caption is being displayed with or without the pages included, so for instance, if the control contains no pages, you can simulate a frame control. Use the Caption property to define the caption of the page.

Here's the list of supported built-in HTML tags:

  • <b> ... </b> displays the text in bold
  • <i> ... </i> displays the text in italics
  • <u> ... </u> underlines the text
  • <s> ... </s> Strike-through text
  • <a id;options> ... </a> displays an anchor element that can be clicked. An anchor is a piece of text or some other object (for example an image) which marks the beginning and/or the end of a hypertext link.The <a> element is used to mark that piece of text (or inline image), and to give its hypertextual relationship to other documents. The control fires the AnchorClick(AnchorID, Options) event when the user clicks the anchor element. The FormatAnchor property customizes the visual effect for anchor elements.
  • <font face;size> ... </font> displays portions of text with a different font and/or different size. For instance, the <font Tahoma;12>bit</font> draws the bit text using the Tahoma font, on size 12 pt. If the name of the font is missing, and instead size is present, the current font is used with a different size. For instance, <font ;12>bit</font> displays the bit text using the current font, but with a different size.
  • <fgcolor rrggbb> ... </fgcolor> or <fgcolor=rrggbb> ... </fgcolor> displays text with a specified foreground color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <bgcolor rrggbb> ... </bgcolor> or <bgcolor=rrggbb> ... </bgcolor> displays text with a specified background color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <solidline rrggbb> ... </solidline> or <solidline=rrggbb> ... </solidline> draws a solid-line on the bottom side of the current text-line, of specified RGB color. The <solidline> ... </solidline> draws a black solid-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <dotline rrggbb> ... </dotline> or <dotline=rrggbb> ... </dotline> draws a dot-line on the bottom side of the current text-line, of specified RGB color. The <dotline> ... </dotline> draws a black dot-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <upline> ... </upline> draws the line on the top side of the current text-line (requires <solidline> or <dotline>).
  • <r> right aligns the text
  • <c> centers the text
  • <br> forces a line-break
  • <img>number[:width]</img> inserts an icon inside the text. The number indicates the index of the icon being inserted. Use the Images method to assign a list of icons to your chart. The last 7 bits in the high significant byte of the number expression indicates the identifier of the skin being used to paint the object. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the part. The width is optional and indicates the width of the icon being inserted. Using the width option you can overwrite multiple icons getting a nice effect. By default, if the width field is missing, the width is 18 pixels.
  • <img>key[:width]</img> inserts a custom size picture into the text being previously loaded using the HTMLPicture property. The Key parameter indicates the key of the picture being displayed. The Width parameter indicates a custom size, if you require to stretch the picture, else the original size of the picture is used.
  • & glyph characters as &amp; ( & ), &lt; ( < ), &gt; ( > ), &qout; ( " ) and &#number; ( the character with specified code ), For instance, the &#8364; displays the EUR character. The & ampersand is only recognized as markup when it is followed by a known letter or a #character and a digit. For instance if you want to display <b>bold</b> in HTML caption you can use &lt;b&gt;bold&lt;/b&gt;
  • <off offset> ... </off> defines the vertical offset to display the text/element. The offset parameter defines the offset to display the element. This tag is inheritable, so the offset is keep while the associated </off> tag is found. You can use the <off offset> HTML tag in combination with the <font face;size> to define a smaller or a larger font to be displayed. For instance: Text with <font ;7><off 6>subscript displays the text such as: Text with subscript The Text with <font ;7><off -6>superscript displays the text such as: Text with subscript
  • <gra rrggbb;mode;blend> ... </gra> defines a gradient text. The text color or <fgcolor> defines the starting gradient color, while the rr/gg/bb represents the red/green/blue values of the ending color, 808080 if missing as gray. The mode is a value between 0 and 4, 1 if missing, and blend could be 0 or 1, 0 if missing. The <font> HTML tag can be used to define the height of the font. Any of the rrggbb, mode or blend field may not be specified. The <gra> with no fields, shows a vertical gradient color from the current text color to gray (808080). For instance the <font ;18><gra FFFFFF;1;1>gradient-center</gra></font> generates the following picture:
  • <out rrggbb;width> ... </out> shows the text with outlined characters, where rr/gg/bb represents the red/green/blue values of the outline color, 808080 if missing as gray, width indicates the size of the outline, 1 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><out 000000><fgcolor=FFFFFF>outlined</fgcolor></out></font> generates the following picture:
  • <sha rrggbb;width;offset> ... </sha> define a text with a shadow, where rr/gg/bb represents the red/green/blue values of the shadow color, 808080 if missing as gray, width indicates the size of shadow, 4 if missing, and offset indicates the offset from the origin to display the text's shadow, 2 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><sha>shadow</sha></font> generates the following picture:

    or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:


property CaptionAlignment

property Tab.CaptionAlignment as CaptionAlignEnum
Specifies horizontal and vertical alignment of the caption to be shown.

Type | Description
CaptionAlignEnum | A CaptionAlignEnum expression that specifies the control's caption horizontal and vertical alignment.
By default, the CaptionAlignment property is exMiddleCenter. Use the CaptionAlignment property to specify the horizontal and vertical alignment for the control's caption. The Caption property specifies the caption to be displayed on the pages part of the control.


property CContainer

property Tab.CContainer as Variant
Specifies the control's container.

Type | Description
Variant | A NET object that indicates the container of the controls to be displayed in the Tab's pages.
The CContainer property specifies the .NET container that holds the controls to be displayed in the Tab pages. Usually the CContainer property should hold a reference to the .NET form that holds the controls to be displayed in the page. Use the Controls property to assign a list of controls being assigned to a page, so they get visible when the page is activated, and they are hidden as soon as the page is deactivated.

For instance, the following VB.NET sample shows how to distribute controls to different pages of the control:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    With AxTab1
        .CContainer = Me
        .Pages(0).Controls = "Button1,CheckBox1"
        .Pages(1).Controls = "Button2,CheckBox2"
    End With
End Sub

For instance, the following C# sample shows how to distribute controls to different pages of the control:

private void Form1_Load(object sender, EventArgs e)
{
    axTab1.CContainer = this;
    axTab1.Pages[0].Controls = "Button1,CheckBox1";
    axTab1.Pages[1].Controls = "Button2,CheckBox2";
}


property ClientHeight

property Tab.ClientHeight as Long
Retrieves the height of the control's client area.

Type | Description
Long | A long expression that indicates the height of the control's client area expressed in pixels.

Use the ClientLeft, ClientTop, ClientWidth and ClientHeight properties to identify the control's client area. The size and position of the client area depends on skin loaded.


property ClientLeft

property Tab.ClientLeft as Long
Retrieves the distance between left edge of the control's client area and the left border of the control.

Type | Description
Long | A long expression that indicates the distance between left edge of the control's client area and the left border of the control.

Use the ClientLeft, ClientTop, ClientWidth and ClientHeight properties to identify the control's client area. The size and position of the client area depends on skin loaded.


property ClientTop

property Tab.ClientTop as Long
Retrieves the distance between top edge of the control's client area and the top border of the control.

Type | Description
Long | A long expression that indicates the distance between top edge of the control's client area and the top border of the control.

Use the ClientLeft, ClientTop, ClientWidth and ClientHeight properties to identify the control's client area. The size and position of the client area depends on skin loaded.


property ClientWidth

property Tab.ClientWidth as Long
Retrieves the width of the control's client area.

Type | Description
Long | A long expression that specifies the width of the control's client area.

Use the ClientLeft, ClientTop, ClientWidth and ClientHeight properties to identify the control's client area. The size and position of the client area depends on skin loaded.


method ClosePopup

method Tab.ClosePopup ()
Closes the floating TAB control.

Type Description
The ClosePopup method closes the TAB control if it is hosted by a floating window. Use the Popup method to host the TAB control to a float window. Use the IsPopup property to check whether a TAB control is hosted by a floating window.


property CustomStyle

property Tab.CustomStyle as String
Returns or sets a string expression that indicates the control's custom style as a file name to a ETB file, or encoded BASE64 string of the ETB file.

Type Description
String A string expression that specifies:
  • the path to a skin file ( *.etb )
  • the BASE64 encoded of the file ( *.etb ). A BASE64 encoded may start as "gBFL..."

Use the Exontrol's exImages tool to build BASE 64 encoded strings on the skin file (*.etb) you have created.

The CustomStyle property / Load method can be used to change at runtime the visual appearance of the control, using a custom ETB file. Use the Style property to apply a predefined style to the control. Use the Load method to load a skin file at runtime. Once CustomStyle property is set, the Style property get changed to: exCustom (-1).

Any of the following can be used to create, edit or view ETB files ( the ETB provides skin capabilities for eXTab component ):

  • eXETB standalone tool ( available for /COM and /NET versions )
  • TabBuilder component ( available for /COM version only )
Here's a screen shot on how the WYSIWYG editor shows as:


property Enabled

property Tab.Enabled as Boolean
Enables or disables the control.

Type | Description
Boolean | A boolean expression that indicates whether the control is enabled or disabled.

The visual appearance of the control is not changed when the Enabled property is changed. Use the Enabled property to disable the control.


property EventParam

property Tab.EventParam(Parameter as Long) as Variant
Retrieves or sets a value that indicates the current's event parameter.

Type | Description
Parameter as Long | A long expression that indicates the index of the parameter being requested ie 0 means the first parameter, 1 means the second, and so on. If -1 is used the EventParam property retrieves the number of parameters. Accessing an not-existing parameter produces an OLE error, such as invalid pointer ( E_POINTER )
Variant | A VARIANT expression that specifies the parameter's value.
The EventParam method is provided to allow changing the event's parameters passed by reference, even if your environment does not support changing it ( uniPaas 1.5 (formerly known as eDeveloper), DBase, and so on ). For instance, Unipaas event-handling logic cannot update ActiveX control variables by updating the received arguments. The EventParam(0) retrieves the value of the first parameter of the event, while the EventParam(1) = 0, changes the value of the second parameter to 0 ( the operation is successfully, only if the parameter is passed by reference ). The EventParam(-1) retrieves the number of the parameters of the current event.

Let's take the event "event KeyDown (KeyCode as Integer, ByVal Shift as Integer)", where the KeyCode parameter is passed by reference. For instance, put the KeyCode parameter on 0, and the arrow keys are disabled while the control has the focus.

In most languages you will type something like:

Private Sub Control1_KeyDown(KeyCode As Integer, Shift As Integer)
    KeyCode = 0
End Sub

In case your environment does not support events with parameters by reference, you can use a code like follows:

Private Sub Control1_KeyDown(KeyCode As Integer, Shift As Integer)
    Control1.EventParam(0) = 0
End Sub

In other words, the EventParam property provides the parameters of the current event for reading or writing access, even if your environment does not allow changing parameters by reference.

Calling the EventParam property outside of an event produces an OLE error, such as pointer invalid, as its scope was designed to be used only during events.


method ExecuteTemplate

method Tab.ExecuteTemplate (Template as String)
Executes a template and returns the result.

Type | Description
Template as String | A Template string being executed
Return | Description
Variant | A Variant expression that indicates the result after executing the Template.
Use the ExecuteTemplate property to returns the result of executing a template file. Use the Template property to execute a template without returning any result. Use the ExecuteTemplate property to execute code by passing instructions as a string ( template string ).

For instance, the following sample displays the number of pages in the control :

Debug.Print Tab1.ExecuteTemplate("Pages.Count()")

Most of our UI components provide a Template page that's accessible in design mode. No matter what programming language you are using, you can have a quick view of the component's features using the WYSWYG Template editor.

  • Place the control to your form or dialog.
  • Locate the Properties item, in the control's context menu, in design mode. If your environment doesn't provide a Properties item in the control's context menu, please try to locate in the Properties browser.
  • Click it, and locate the Template page.
  • Click the Help button. In the left side, you will see the component, in the right side, you will see a x-script code that calls methods and properties of the control.

The control's Template page helps user to initialize the control's look and feel in design mode, using the x-script language that's easy and powerful. The Template page displays the control on the left side of the page. On the right side of the Template page, a simple editor is displayed where user writes the initialization code. The control's look and feel is automatically updated as soon as the user types new instructions. The Template script is saved to the container persistence ( when Apply button is pressed ), and it is executed when the control is initialized at runtime. Any component that provides a WYSWYG Template page, provides a Template property. The Template property executes code from a string ( template string ).

The Template script is composed by lines of instructions. Instructions are separated by "\n\r" ( newline ) characters.

An instruction can be one of the following:

  • Dim list of variables Declares the variables. Multiple variables are separated by commas. ( Sample: Dim h, h1, h2 )
  • variable = property( list of arguments ) Assigns the result of the property to a variable. The "variable" is the name of a declared variable. The "property" is the property name of the object in the context. The "list or arguments" may include variables or values separated by commas. ( Sample: h = InsertItem(0,"New Child") )
  • property( list of arguments ) = value Changes the property. The value can be a variable, a string, a number, a boolean value or a RGB value.
  • method( list of arguments ) Invokes the method. The "list or arguments" may include variables or values separated by commas.
  • { Beginning the object's context. The properties or methods called between { and } are related to the last object returned by the property prior to { declaration.
  • } Ending the object's context
  • object. property( list of arguments ).property( list of arguments ).... The .(dot) character splits the object from its property. For instance, the Columns.Add("Column1").HeaderBackColor = RGB(255,0,0), adds a new column and changes the column's header back color.

The Template supports the following general functions:

  • RGB(R,G,B) property retrieves an RGB value, where the R, G, B are byte values that indicates the R G B values for the color being specified. For instance, the following code changes the control's background color to red: BackColor = RGB(255,0,0)
  • CreateObject(progID) property creates and retrieves a single uninitialized object of the class associated with a specified program identifier.


property FixedPageWidth

property Tab.FixedPageWidth as Long
Specifies the fixed width of the page (the control displays the pages with same size)

Type | Description
Long | A Long expression that defines the width to show all the pages within the control
By default, the FixedPageWidth property is 0. The FixedPageWidth property has no effect if 0 or TabAutoResize property is true. If the FixedPageWidth property is 0, the width of each page is automatically computed so it fits its caption (Caption property). The FixedPageWidth property specifies the width to display all pages, when the TabAutoResize property is false.

The following screen shot shows the control while FixedPageWidth property is 0 (TabAutoResize property is false):

The following screen shot shows the control while FixedPageWidth property is 96 (TabAutoResize property is false):

The following screen shot shows the control while TabAutoResize property is true (the FixedPageWidth property is ignored):


property Font

property Tab.Font as IFontDisp
Retrieves or sets the control's font.

Type | Description
IFontDisp | A Font object being used to paint the pages into the control.

The Font property specifies the font used by pages. The control supports built-in HTML format. Please check the Caption property of Page object. Use the <b>, <i>, <s> and <u> built-in HTML tags, in the Caption property to apply different font attributes to the control pages.


property ForeColor

property Tab.ForeColor as Color
Retrieves or sets a value that indicates the control's foreground color.

Type | Description
Color | A color expression that indicates the control's foreground color.

Use the ForeColor property to change the control's foreground color (this apply to captions of the pages, not not inner controls) . Use the <fgcolor> and <bgcolor> built-in HTML tags, in the Caption property to apply different colors for the pages.


property HotBackColor

property Tab.HotBackColor as Color
Retrieves or sets a value that indicates the hot-tracking background color.

Type | Description
Color | A Color expression that specifies the background color for the page while cursor hovers it (-1 indicates no effect)
By default, the HotBackColor property is -1, which indicates no effect (use Color.Transparent for /NET assembly). The HotBackColor property sets the background color for the page's caption while cursor hovers it. The HotObject property retrieves or sets a value that indicates the index within current tab-skin, that changes its background while the cursor hovers the page. The HotForeColor property sets the foreground color for the page's caption while cursor hovers it.

The HotBackColor property changes the background color of:

  • page, if the HotObject property is -1 or points to a non-existing part of the skin-objects
  • a particular object as indicates by the HotObject property (for instance you can show just a colored-line when the cursor hovers the page)

The HotBackColor property has no effect if:

  • -1
  • the HotObject property points to a non-existing part of the skin-objects


property HotForeColor

property Tab.HotForeColor as Color
Retrieves or sets a value that indicates the hot-tracking foreground color.

Type | Description
Color | A Color expression that specifies the foreground color for page's caption while cursor hovers it (-1 indicates no effect)
By default, the HotForeColor property is -1, which indicates no effect (use Color.Transparent for /NET assembly). The HotForeColor property sets the foreground color for the page's caption while cursor hovers it. Use the ForeColor property to change the control's foreground color (this apply to captions of the pages, not not inner controls). The HotBackColor property sets the background color for the page's caption while cursor hovers it. The HotObject property retrieves or sets a value that indicates the index within current tab-skin, that changes its background while the cursor hovers the page.


property HotObject

property Tab.HotObject as Long
Retrieves or sets a value that indicates the index within current tab-skin, that changes its background while the cursor hovers the page.

Type | Description
Long | A long expression that specifies the index (0-based) within current tab-skin, that changes its background while the cursor hovers the page.
By default, the HotObject property is -1, which indicates no effect. The HotObject property retrieves or sets a value that indicates the index within current tab-skin, that changes its background while the cursor hovers the page. The HotBackColor property sets the background color for the page's caption while cursor hovers it. The HotForeColor property sets the foreground color for the page's caption while cursor hovers it.

The HotBackColor property changes the background color of:

  • page, if the HotObject property is -1 or points to a non-existing part of the skin-objects
  • a particular object as indicates by the HotObject property (for instance you can show just a colored-line when the cursor hovers the page)

The HotBackColor property has no effect if:

  • -1
  • the HotObject property points to a non-existing part of the skin-objects

The following video shows how you can define the hot-colors for the control:

  • play
What you need is to:
  • open the control's skin using "Edit tab" , "Edit Visual Design" (design-mode) or ExETB.exe WYSWYG tool
  • insert a child-object to "Normal" page
  • set the alignment, size and color for the newly inserted object
  • collect and use its identifier into the HotObject property (the red circle shows the identifier you can use within the HotObject property)

as in the following screen shot:


property HTMLPicture

property Tab.HTMLPicture(Key as String) as Variant
Adds or replaces a picture in HTML captions.

Type | Description
Key as String | A String expression that indicates the key of the picture being added or replaced. If the Key property is Empty string, the entire collection of pictures is cleared.
Variant The HTMLPicture specifies the picture being associated to a key. It can be one of the followings:
  • a string expression that indicates the path to the picture file, being loaded.
  • a string expression that indicates the base64 encoded string that holds a picture object, Use the eximages tool to save your picture as base64 encoded format.
  • A Picture object that indicates the picture being added or replaced. ( A Picture object implements IPicture interface ),

If empty, the picture being associated to a key is removed. If the key already exists the new picture is replaced. If the key is not empty, and it doesn't not exist a new picture is added.

The HTMLPicture property handles a collection of custom size picture being displayed in the HTML captions, using the <img> tags. By default, the HTMLPicture collection is empty. Use the HTMLPicture property to add new pictures to be used in HTML captions. For instance, the HTMLPicture("pic1") = "c:\winnt\zapotec.bmp", loads the zapotec picture and associates the pic1 key to it. Any "<img>pic1</img>" sequence in HTML captions, displays the pic1 picture. On return, the HTMLPicture property retrieves a Picture object ( this implements the IPictureDisp interface ).


property hWnd

property Tab.hWnd as Long
Retrieves the control's window handle.

Type | Description
Long | A long expression that indicates the handle of the control's window.

The Microsoft Windows operating environment identifies each form and control in an application by assigning it a handle, or hWnd. The hWnd property is used with Windows API calls. Many Windows operating environment functions require the hWnd of the active window as an argument.


method Images

method Tab.Images (Handle as Variant)
Sets at runtime the control's image list. The Handle should be a handle to an Image List Control.

Type Description
Handle as Variant The Handle parameter can be:
  • A string expression that specifies the ICO file to add. The ICO file format is an image file format for computer icons in Microsoft Windows. ICO files contain one or more small images at multiple sizes and color depths, such that they may be scaled appropriately. For instance, Images("c:\temp\copy.ico") method adds the sync.ico file to the control's Images collection (string, loads the icon using its path)
  • A string expression that indicates the BASE64 encoded string that holds the icons list. Use the Exontrol's ExImages tool to save/load your icons as BASE64 encoded format. In this case the string may begin with "gBJJ..." (string, loads icons using base64 encoded string)
  • A reference to a Microsoft ImageList control (mscomctl.ocx, MSComctlLib.ImageList type) that holds the icons to add (object, loads icons from a Microsoft ImageList control)
  • A reference to a Picture (IPictureDisp implementation) that holds the icon to add. For instance, the VB's LoadPicture (Function LoadPicture([FileName], [Size], [ColorDepth], [X], [Y]) As IPictureDisp) or LoadResPicture (Function LoadResPicture(id, restype As Integer) As IPictureDisp) returns a picture object (object, loads icon from a Picture object)
  • A long expression that identifies a handle to an Image List Control ( the Handle should be of HIMAGELIST type ). On 64-bit platforms, the Handle parameter must be a Variant of LongLong / LONG_PTR data type ( signed 64-bit (8-byte) integers ), saved under llVal field, as VT_I8 type. The LONGLONG / LONG_PTR is __int64, a 64-bit integer. For instance, in C++ you can use as Images( COleVariant( (LONG_PTR)hImageList) ) or Images( COleVariant( (LONGLONG)hImageList) ), where hImageList is of HIMAGELIST type. The GetSafeHandle() method of the CImageList gets the HIMAGELIST handle (long, loads icon from HIMAGELIST type)

The user can add images at design time, by drag and drop files to combo's image holder. The ImageSize property defines the size (width/height) of the icons within the control's Images collection. Use the ReplaceIcon method to add, remove or clear icons in the control's images collection. Use the Image property to assign an icon to a page.

The following sample loads icons using the BASE64 encoded strings:

With Tab1
    .Images "gBJJgBAICAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwkbiAAQGJqrAxgAxjAwt8w+Pib/x2NymJQFNymdzGNyNyymHyefyGeyGaoOoy+n02V2GhtOlyG0jOb28Z1lAykb1mjh+w0nB2Vg4GW22I3Wg3G9nfO5eQ32vw+q4fI4OH4tT4+t2GZxW95ugneq6fSjXd6+IxXW7PE7dR23r3e45Xe80z8H26Pszbuvc7EBO8+KqvXA73ss37Xpo1j8v7BDLNVALYwK7jGuq9sNM3CjbOgnMFtq4L7QjAkLKs/bhQS2EJsU5KhxK+0SRXE6tQ7FcbwlFz4KVEsPxqrr1sNFbdqvIUgSRJMlSXJCLB8lcno8kCRJIACSpRK6cO1JiZIojZ+H+ebLI0eAfnBMaMnAB5wB+jZwAOYAHzdOABzmQEsscA87t9Os6vTPs+EAA8+TfNwBnxOUyAGf1EoyfIHn+T8hx4gIA=="
End With

The following sample uses the Microsoft Image List control:

Tab1.Images ImageList1.hImageList


property ImageSize

property Tab.ImageSize as Long
Retrieves or sets the size of icons the control displays..

Type | Description
Long | A long expression that defines the size of icons the control displays
By default, the ImageSize property is 16 (pixels). The ImageSize property specifies the size of icons being loaded using the Images method. The control's Images collection is cleared if the ImageSize property is changed, so it is recommended to set the ImageSize property before calling the Images method. The ImageSize property defines the size (width/height) of the icons within the control's Images collection. For instance, if the ICO file to load includes different types the one closest with the size specified by ImageSize property is loaded by Images method. The ImageSize property does NOT change the height for the control's font.


property IsPopup

property Tab.IsPopup as Boolean
Specifies whether the TAB control is hosted by a popup window.

Type | Description
Boolean | A boolean expression that indicates whether the TAB control is hosted by a floating window.

Use the Popup method to host the TAB control to a float window. Use the ClosePopup method to close the floating window that hosts the TAB control.


property LeftPictureRoot

property Tab.LeftPictureRoot as Long
Specifies the indent of the picture on the root object.

Type | Description
Long | A long expression that specifies the indentation of the picture being displayed on the root object of the skin being applied to the TAB control.
Use the LeftPictureRoot and TopPictureRoot properties to display a specified part of the form's background picture. By default, the LeftPictureRoot and TopPictureRoot properties are updated as soon as the control moves in the form. The LeftPictureRoot and TopPictureRoot properties indicates in pixels the (top-left) corner of the TAB control relative to the form. These properties have effect only if the root object of the skin being applied to the control displays a picture. Use the Load method to load and apply a new skin file to the control. Use the Style property to apply a predefined style to the control.

The following screen shot shows the picture on the form ( the form has no other controls in ):

The following screen shot shows the TAB control in the form with no picture assigned to the root object of the skin:

The following screen shot the TAB control after we applied the same source picture on the root object of the skin ( Invoke the "Edit-Tab" item in design mode, Select the "Root" item, Select "Picture\Add New" in Background panel, and select the picture to be put on the root's background, Click the "Save", and close the designer )

In these cases, we have used the following picture to be put on the form's background as well as on the root object of the skin.


method Load

method Tab.Load (FileName as String)
Loads the tab skin file.

Type Description
FileName as String A string expression that specifies:
  • the path to a skin file ( *.etb )
  • the BASE64 encoded of the file ( *.etb ). A BASE64 encoded starts as ""

Use the Exontrol's exImages tool to build BASE 64 encoded strings on the skin file (*.etb) you have created.

Use the Load method to load a skin file at runtime. Once Load method is called, the Style property get changed to: exCustom (-1). The Load method / CustomStyle property can be used to change at runtime the visual appearance of the control, using a custom ETB file. Use the Style property to apply a predefined style to the control.

Any of the following can be used to create, edit or view ETB files ( the ETB provides skin capabilities for eXTab component ):

  • eXETB standalone tool ( available for /COM and /NET versions )
  • TabBuilder component ( available for /COM version only )
Here's a screen shot on how the WYSIWYG editor shows as:


property PageFromPoint

property Tab.PageFromPoint (X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS) as Long
Retrieves the number of the page over the point.

Type | Description
X as OLE_XPOS_PIXELS | A single that specifies the current X location of the mouse pointer. The x values is always expressed in client coordinates.
Y as OLE_YPOS_PIXELS | A single that specifies the current Y location of the mouse pointer. The y values is always expressed in client coordinates
Long | A long expression that indicates the position of page over the cursor.

Use the PageFromPoint property to get the page over the cursor. The X and Y coordinates should be converted to control's client coordinates. The expression being returned by the PageFromPoint property should be translated using PosToIndex property if the Position property was used. Else, the position and the index is the same, so no confusion can be made. The PageFromPoint(-1,-1) returns the page from the current cursor.

The following sample prints the page's key over the cursor:

Private Sub Tab1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With Tab1
        Dim p As Long
        p = .PageFromPoint(-1, -1)
        If (p >= 0) Then
            Debug.Print "The cursor is over the page '" & .Pages(.Pages.PosToIndex(p)).Key & "'"
        End If
    End With
End Sub


property Pages

property Tab.Pages as Pages
Gets the pages collection.

Type | Description
Pages | A Pages object that indicates the control's Pages collection.

Use the Pages property to access the Pages collection of the control.


method Popup

method Tab.Popup (X as Long, Y as Long, [Caption as Variant], [Options as Variant])
Floats the tab control to a popup window.

Type | Description
X as Long | A long expression that indicates the x coordinate of the floating window being created. The value is in screen coordinate.
Y as Long | A long expression that indicates the y coordinate of the floating window being created. The value is in screen coordinate.
Caption as Variant | A string expression that indicates the caption of the floating window being created.
Options as Variant | Not used.

The Popup method creates a float window that hosts a TAB control. The position of the floating window is indicated by the X and Y values. The X and Y values are screen coordinates. The caption of the floating window is defined by the Caption parameter. Use the ClosePopup method to close the window created by the Popup method. Use the IsPopup property to check whether the TAB control is hosted by a floating window created using the Popup method. Use the PopupVisible property to hide the floating window that hosts a TAB control.


property PopupVisible

property Tab.PopupVisible as Boolean
Specifies whether the floating TAB control is visible or hidden.

Type | Description
Boolean | A boolean expression that indicates whether the floating TAB control is visible or hidden.

Use the PopupVisible property checks whether whether the floating TAB control is visible or hidden. Use the Popup method to host the TAB control to a floating window.


method Refresh

method Tab.Refresh ()
Refreshes the control.

Type Description

Refreshes the control.


method ReplaceIcon

method Tab.ReplaceIcon ([Icon as Variant], [Index as Variant])
Adds a new icon, replaces an icon or clears the control's image list.

Type | Description
Icon as Variant | A long expression that indicates the icon's handle
Index as Variant | A long expression that indicates the index where icon is inserted
Return | Description
Long | long expression that indicates the index of the icon in the images collection

Use the ReplaceIcon property to add, remove or replace an icon in the control's images collection. Also, the ReplaceIcon property can clear the images collection. Use the Images method to attach a image list to the control.

The following sample shows how to add a new icon to control's images list:

i = Tab1.ReplaceIcon( LoadPicture("d:\icons\help.ico").Handle), i specifies the index where the icon is added

The following sample shows how to replace an icon into control's images list::

i = Tab1.ReplaceIcon( LoadPicture("d:\icons\help.ico").Handle, 0), i is zero, so the first icon is replaced

The following sample shows how to remove an icon from control's images list:

Tab1.ReplaceIcon 0, i, i specifies the index of icon removed.

The following sample shows how to clear the control's icons collection:

Tab1.ReplaceIcon 0, -1


property SelectEnablePageIfDisable

property Tab.SelectEnablePageIfDisable as Boolean
Specifies a value that indicates whether the control selects an enabled page if the focused page is disabled.

Type | Description
Boolean | A boolean expression that indicates whether the control selects an enabled page if the focused page is disabled.

By default, the SelectEnablePageIfDisable property is True. The property has effect if the user disables the focused page. Use the Enabled property to disable the page.


property ShowFocusRect

property Tab.ShowFocusRect as Boolean
Specifies whether the control marks the focused page tab.

Type | Description
Boolean | A boolean expression that indicates whether the focused page is marked using a focus rectangle.

The focus rectangle is displayed only if the ShowFocusRect property is True, and the control has the focus. When the control loses the focus, the focus rectangle is removed. Use the ShowFocusRect property to hide the focus rectangle. If the ShowFocusRect property is False, the focus rectangle is not visible no matter if the control has the focus or not.


property ShowImageList

property Tab.ShowImageList as Boolean
Specifies whether the control's image list window is visible or hidden.

Type | Description
Boolean | A boolean expression that indicates whether the ImageList panel is visible or hidden.
By default, the ShowImageList property is True. Use the ShowImageList property to hide the control's images list window. The control's images list window is visible only at design time. Use the Images method to associate an images list control to the tab control.


property ShowScroll

property Tab.ShowScroll as Boolean
Specifies whether the control displays a scroll button when required.

Type | Description
Boolean | A boolean expression that indicates whether the control shows or hides the scroll buttons.
By default, the ShowScroll property is True. Use the ShowScroll property to hide the control's scroll buttons. The FixedPageWidth property specifies the width to display all pages, when the TabAutoResize is false. Use the scroll buttons to scroll the pages. The control does not display the scroll buttons if the TabAutoResize property is True, even if the ShowScroll property is True.


method ShowToolTip

method Tab.ShowToolTip (ToolTip as String, [Title as Variant], [Alignment as Variant], [X as Variant], [Y as Variant])
Shows the specified tooltip at given position.

Type Description
ToolTip as String The ToolTip parameter can be any of the following:
  • NULL(BSTR) or "<null>"(string) to indicate that the tooltip for the object being hovered is not changed
  • A String expression that indicates the description of the tooltip, that supports built-in HTML format (adds, replaces or changes the object's tooltip)
Title as Variant The Title parameter can be any of the following:
  • missing (VT_EMPTY, VT_ERROR type) or "<null>"(string) the title for the object being hovered is not changed.
  • A String expression that indicates the title of the tooltip (no built-in HTML format) (adds, replaces or changes the object's title)
Alignment as Variant A long expression that indicates the alignment of the tooltip relative to the position of the cursor. If missing (VT_EMPTY, VT_ERROR) the alignment of the tooltip for the object being hovered is not changed.

The Alignment parameter can be one of the following:

  • 0 - exTopLeft
  • 1 - exTopRight
  • 2 - exBottomLeft
  • 3 - exBottomRight
  • 0x10 - exCenter
  • 0x11 - exCenterLeft
  • 0x12 - exCenterRight
  • 0x13 - exCenterTop
  • 0x14 - exCenterBottom

By default, the tooltip is aligned relative to the top-left corner (0 - exTopLeft).

X as Variant Specifies the horizontal position to display the tooltip as one of the following:
  • missing (VT_EMPTY, VT_ERROR type), indicates that the tooltip is shown on its default position / current cursor position (ignored)
  • -1, indicates the current horizontal position of the cursor (current x-position)
  • a numeric expression that indicates the horizontal screen position to show the tooltip (fixed screen x-position)
  • a string expression that indicates the horizontal displacement relative to default position to show the tooltip (moved)
Y as Variant Specifies the vertical position to display the tooltip as one of the following:
  • missing (VT_EMPTY, VT_ERROR type), indicates that the tooltip is shown on its default position / current cursor position (ignored)
  • -1, indicates the current vertical position of the cursor (current y-position)
  • a numeric expression that indicates the vertical screen position to show the tooltip (fixed screen y-position)
  • a string expression that indicates the vertical displacement relative to default position to show the tooltip (displacement)
Use the ShowToolTip method to display a custom tooltip at specified position or to update the object's tooltip, title or position. You can call the ShowToolTip method during the MouseMove event. Use the ToolTipPopDelay property specifies the period in ms of time the ToolTip remains visible if the mouse pointer is stationary within a control. The ToolTipDelay property specifies the time in ms that passes before the ToolTip appears. Use the ToolTipWidth property to specify the width of the tooltip window. Use the ToolTipFont property to change the tooltip's font. Use the Background(exToolTipAppearance) property indicates the visual appearance of the borders of the tooltips. Use the Background(exToolTipBackColor) property indicates the tooltip's background color. Use the Background(exToolTipForeColor) property indicates the tooltip's foreground color.

For instance:

  • ShowToolTip(`<null>`,`<null>`,,`+8`,`+8`), shows the tooltip of the object moved relative to its default position
  • ShowToolTip(`<null>`,`new title`), adds, changes or replaces the title of the object's tooltip
  • ShowToolTip(`new content`), adds, changes or replaces the object's tooltip
  • ShowToolTip(`new content`,`new title`), shows the tooltip and title at current position
  • ShowToolTip(`new content`,`new title`,,`+8`,`+8`), shows the tooltip and title moved relative to the current position
  • ShowToolTip(`new content`,``,,128,128), displays the tooltip at a fixed position
  • ShowToolTip(``,``), hides the tooltip

The ToolTip parameter supports the built-in HTML format like follows:

  • <b> ... </b> displays the text in bold
  • <i> ... </i> displays the text in italics
  • <u> ... </u> underlines the text
  • <s> ... </s> Strike-through text
  • <a id;options> ... </a> displays an anchor element that can be clicked. An anchor is a piece of text or some other object (for example an image) which marks the beginning and/or the end of a hypertext link.The <a> element is used to mark that piece of text (or inline image), and to give its hypertextual relationship to other documents. The control fires the AnchorClick(AnchorID, Options) event when the user clicks the anchor element. The FormatAnchor property customizes the visual effect for anchor elements.
  • <font face;size> ... </font> displays portions of text with a different font and/or different size. For instance, the <font Tahoma;12>bit</font> draws the bit text using the Tahoma font, on size 12 pt. If the name of the font is missing, and instead size is present, the current font is used with a different size. For instance, <font ;12>bit</font> displays the bit text using the current font, but with a different size.
  • <fgcolor rrggbb> ... </fgcolor> or <fgcolor=rrggbb> ... </fgcolor> displays text with a specified foreground color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <bgcolor rrggbb> ... </bgcolor> or <bgcolor=rrggbb> ... </bgcolor> displays text with a specified background color. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <solidline rrggbb> ... </solidline> or <solidline=rrggbb> ... </solidline> draws a solid-line on the bottom side of the current text-line, of specified RGB color. The <solidline> ... </solidline> draws a black solid-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <dotline rrggbb> ... </dotline> or <dotline=rrggbb> ... </dotline> draws a dot-line on the bottom side of the current text-line, of specified RGB color. The <dotline> ... </dotline> draws a black dot-line on the bottom side of the current text-line. The rr/gg/bb represents the red/green/blue values of the color in hexa values.
  • <upline> ... </upline> draws the line on the top side of the current text-line (requires <solidline> or <dotline>).
  • <r> right aligns the text
  • <c> centers the text
  • <br> forces a line-break
  • <img>number[:width]</img> inserts an icon inside the text. The number indicates the index of the icon being inserted. Use the Images method to assign a list of icons to your chart. The last 7 bits in the high significant byte of the number expression indicates the identifier of the skin being used to paint the object. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the part. The width is optional and indicates the width of the icon being inserted. Using the width option you can overwrite multiple icons getting a nice effect. By default, if the width field is missing, the width is 18 pixels.
  • <img>key[:width]</img> inserts a custom size picture into the text being previously loaded using the HTMLPicture property. The Key parameter indicates the key of the picture being displayed. The Width parameter indicates a custom size, if you require to stretch the picture, else the original size of the picture is used.
  • & glyph characters as &amp; ( & ), &lt; ( < ), &gt; ( > ), &qout; ( " ) and &#number; ( the character with specified code ), For instance, the &#8364; displays the EUR character. The & ampersand is only recognized as markup when it is followed by a known letter or a #character and a digit. For instance if you want to display <b>bold</b> in HTML caption you can use &lt;b&gt;bold&lt;/b&gt;
  • <off offset> ... </off> defines the vertical offset to display the text/element. The offset parameter defines the offset to display the element. This tag is inheritable, so the offset is keep while the associated </off> tag is found. You can use the <off offset> HTML tag in combination with the <font face;size> to define a smaller or a larger font to be displayed. For instance: Text with <font ;7><off 6>subscript displays the text such as: Text with subscript The Text with <font ;7><off -6>superscript displays the text such as: Text with subscript
  • <gra rrggbb;mode;blend> ... </gra> defines a gradient text. The text color or <fgcolor> defines the starting gradient color, while the rr/gg/bb represents the red/green/blue values of the ending color, 808080 if missing as gray. The mode is a value between 0 and 4, 1 if missing, and blend could be 0 or 1, 0 if missing. The <font> HTML tag can be used to define the height of the font. Any of the rrggbb, mode or blend field may not be specified. The <gra> with no fields, shows a vertical gradient color from the current text color to gray (808080). For instance the <font ;18><gra FFFFFF;1;1>gradient-center</gra></font> generates the following picture:
  • <out rrggbb;width> ... </out> shows the text with outlined characters, where rr/gg/bb represents the red/green/blue values of the outline color, 808080 if missing as gray, width indicates the size of the outline, 1 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><out 000000><fgcolor=FFFFFF>outlined</fgcolor></out></font> generates the following picture:
  • <sha rrggbb;width;offset> ... </sha> define a text with a shadow, where rr/gg/bb represents the red/green/blue values of the shadow color, 808080 if missing as gray, width indicates the size of shadow, 4 if missing, and offset indicates the offset from the origin to display the text's shadow, 2 if missing. The text color or <fgcolor> defines the color to show the inside text. The <font> HTML tag can be used to define the height of the font. For instance the <font ;31><sha>shadow</sha></font> generates the following picture:

    or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:


property Style

property Tab.Style as TabStyleEnum
Specifies the style of the tab control from a list of predefined styles.

Type | Description
TabStyleEnum | A long expression that indicates the tab's style.

Use the Style property to change the visual appearance of the control.


property TabAutoResize

property Tab.TabAutoResize as Boolean
Specifies whether the pages are auto arranged to fit the control's client area.

Type | Description
Boolean | A boolean expression that specifies whether the pages are auto arranged to fit the control's client area.

By default, the TabAutoResize property is false. Use the TabAutoResize property to arrange the visible pages to fit the control's client area. The FixedPageWidth property specifies the width to display all pages, when the TabAutoResize is false.Use the ShowScroll property to show the scroll buttons, if the TabAutoResize property is False. Use the Visible property to show or hide a page.

The following screen shot shows the control while TabAutoResize property is true (the FixedPageWidth property is ignored):

The following screen shot shows the control while FixedPageWidth property is 0 (TabAutoResize property is false):

The following screen shot shows the control while FixedPageWidth property is 96 (TabAutoResize property is false):


property Template

property Tab.Template as String
Specifies the control's template.

Type | Description
String | A string expression that indicates the control's template string.
The control's template uses the X-Script language to initialize the control's content. Use the Template property page of the control to update the control's Template property. Use the Template property to execute code by passing instructions as a string ( template string ). Use the ExecuteTemplate property to return the result of executing the template script.

Most of our UI components provide a Template page that's accessible in design mode. No matter what programming language you are using, you can have a quick view of the component's features using the WYSWYG Template editor.

  • Place the control to your form or dialog.
  • Locate the Properties item, in the control's context menu, in design mode. If your environment doesn't provide a Properties item in the control's context menu, please try to locate in the Properties browser.
  • Click it, and locate the Template page.
  • Click the Help button. In the left side, you will see the component, in the right side, you will see a x-script code that calls methods and properties of the control.

The control's Template page helps user to initialize the control's look and feel in design mode, using the x-script language that's easy and powerful. The Template page displays the control on the left side of the page. On the right side of the Template page, a simple editor is displayed where user writes the initialization code. The control's look and feel is automatically updated as soon as the user types new instructions. The Template script is saved to the container persistence ( when Apply button is pressed ), and it is executed when the control is initialized at runtime. Any component that provides a WYSWYG Template page, provides a Template property. The Template property executes code from a string ( template string ).

The Template script is composed by lines of instructions. Instructions are separated by "\n\r" ( newline ) characters.

An instruction can be one of the following:

  • Dim list of variables Declares the variables. Multiple variables are separated by commas. ( Sample: Dim h, h1, h2 )
  • variable = property( list of arguments ) Assigns the result of the property to a variable. The "variable" is the name of a declared variable. The "property" is the property name of the object in the context. The "list or arguments" may include variables or values separated by commas. ( Sample: h = InsertItem(0,"New Child") )
  • property( list of arguments ) = value Changes the property. The value can be a variable, a string, a number, a boolean value or a RGB value.
  • method( list of arguments ) Invokes the method. The "list or arguments" may include variables or values separated by commas.
  • { Beginning the object's context. The properties or methods called between { and } are related to the last object returned by the property prior to { declaration.
  • } Ending the object's context
  • object. property( list of arguments ).property( list of arguments ).... The .(dot) character splits the object from its property. For instance, the Columns.Add("Column1").HeaderBackColor = RGB(255,0,0), adds a new column and changes the column's header back color.

The Template supports the following general functions:

  • RGB(R,G,B) property retrieves an RGB value, where the R, G, B are byte values that indicates the R G B values for the color being specified. For instance, the following code changes the control's background color to red: BackColor = RGB(255,0,0)
  • CreateObject(progID) property creates and retrieves a single uninitialized object of the class associated with a specified program identifier.


property TemplateDef

property Tab.TemplateDef as Variant
Defines inside variables for the next Template/ExecuteTemplate call.

Type | Description
Variant | A string expression that indicates the Dim declaration, or any Object expression to be assigned to previously declared variables.
The TemplateDef property has been added to allow programming languages such as dBASE Plus to set control's properties with multiple parameters. It is known that programming languages such as dBASE Plus or XBasic from AlphaFive, does not support setting a property with multiple parameters. In other words, these programming languages does not support something like Property(Parameters) = Value, so our controls provide an alternative using the TemplateDef method. The first call of the TemplateDef should be a declaration such as "Dim a,b" which means the next 2 calls of the TemplateDef defines the variables a and b. The next call should be Template or ExecuteTemplate property which can use the variable a and b being defined previously.

So, calling the TemplateDef property should be as follows:

with (Control)
    TemplateDef = [Dim var_Column]
    TemplateDef = var_Column
    Template = [var_Column.Def(4) = 255]
endwith

This sample allocates a variable var_Column, assigns the value to the variable ( the second call of the TemplateDef ), and the Template call uses the var_Column variable ( as an object ), to call its Def property with the parameter 4.

Let's say we need to define the background color for a specified column, so we need to call the Def(exCellBackColor) property of the column, to define the color for all cells in the column.

The following VB6 sample shows setting the Def property such as:

With Control
    .Columns.Add("Column 1").Def(exCellBackColor) = 255
    .Columns.Add "Column 2"
    .Items.AddItem 0
    .Items.AddItem 1
    .Items.AddItem 2
End With

In dBASE Plus, calling the Def(4) has no effect, instead using the TemplateDef helps you to use properly the Def property as follows:

local Control,var_Column

Control = form.Activex1.nativeObject
// Control.Columns.Add("Column 1").Def(4) = 255
var_Column = Control.Columns.Add("Column 1")
with (Control)
    TemplateDef = [Dim var_Column]
    TemplateDef = var_Column
    Template = [var_Column.Def(4) = 255]
endwith
Control.Columns.Add("Column 2")
Control.Items.AddItem(0)
Control.Items.AddItem(1)
Control.Items.AddItem(2)

The equivalent sample for XBasic in A5, is as follows:

Dim Control as P
Dim var_Column as P

Control = topparent:CONTROL_ACTIVEX1.activex
' Control.Columns.Add("Column 1").Def(4) = 255
var_Column = Control.Columns.Add("Column 1")
Control.TemplateDef = "Dim var_Column"
Control.TemplateDef = var_Column
Control.Template = "var_Column.Def(4) = 255"

Control.Columns.Add("Column 2")
Control.Items.AddItem(0)
Control.Items.AddItem(1)
Control.Items.AddItem(2)

The samples just call the Column.Def(4) = Value, using the TemplateDef. The first call of TemplateDef property is "Dim var_Column", which indicates that the next call of the TemplateDef will defines the value of the variable var_Column, in other words, it defines the object var_Column. The last call of the Template property uses the var_Column member to use the x-script and so to set the Def property so a new color is being assigned to the column.

The TemplateDef, Template and ExecuteTemplate support x-script language ( Template script of the Exontrols ), like explained bellow:

The Template or x-script is composed by lines of instructions. Instructions are separated by "\n\r" ( newline characters ) or ";" character. The ; character may be available only for newer versions of the components.

An x-script instruction/line can be one of the following:

  • Dim list of variables Declares the variables. Multiple variables are separated by commas. ( Sample: Dim h, h1, h2 )
  • variable = property( list of arguments ) Assigns the result of the property to a variable. The "variable" is the name of a declared variable. The "property" is the property name of the object in the context. The "list or arguments" may include variables or values separated by commas. ( Sample: h = InsertItem(0,"New Child") )
  • property( list of arguments ) = value Changes the property. The value can be a variable, a string, a number, a boolean value or a RGB value.
  • method( list of arguments ) Invokes the method. The "list or arguments" may include variables or values separated by commas.
  • { Beginning the object's context. The properties or methods called between { and } are related to the last object returned by the property prior to { declaration.
  • } Ending the object's context
  • object. property( list of arguments ).property( list of arguments ).... The .(dot) character splits the object from its property. For instance, the Columns.Add("Column1").HeaderBackColor = RGB(255,0,0), adds a new column and changes the column's header back color.

The x-script may uses constant expressions as follow:

  • boolean expression with possible values as True or False
  • numeric expression may starts with 0x which indicates a hexa decimal representation, else it should starts with digit, or +/- followed by a digit, and . is the decimal separator. Sample: 13 indicates the integer 13, or 12.45 indicates the double expression 12,45
  • date expression is delimited by # character in the format #mm/dd/yyyy hh:mm:ss#. Sample: #31/12/1971# indicates the December 31, 1971
  • string expression is delimited by " or ` characters. If using the ` character, please make sure that it is different than ' which allows adding comments inline. Sample: "text" indicates the string text.

Also , the template or x-script code may support general functions as follows:

  • Me property indicates the original object.
  • RGB(R,G,B) property retrieves an RGB value, where the R, G, B are byte values that indicates the R G B values for the color being specified. For instance, the following code changes the control's background color to red: BackColor = RGB(255,0,0)
  • LoadPicture(file) property loads a picture from a file or from BASE64 encoded strings, and returns a Picture object required by the picture properties.
  • CreateObject(progID) property creates and retrieves a single uninitialized object of the class associated with a specified program identifier.


method TemplatePut

method Tab.TemplatePut (NewVal as Variant)
Defines inside variables for the next Template/ExecuteTemplate call.

Type | Description
NewVal as Variant | A string expression that indicates the Dim declaration, or any Object expression to be assigned to previously declared variables.
The TemplatePut method / TemplateDef property has been added to allow programming languages such as dBASE Plus to set control's properties with multiple parameters. It is known that programming languages such as dBASE Plus or XBasic from AlphaFive, does not support setting a property with multiple parameters. In other words, these programming languages does not support something like Property(Parameters) = Value, so our controls provide an alternative using the TemplateDef / TemplatePut method. The first call of the TemplateDef should be a declaration such as "Dim a,b" which means the next 2 calls of the TemplateDef defines the variables a and b. The next call should be Template or ExecuteTemplate property which can use the variable a and b being defined previously.

The TemplateDef, TemplatePut, Template and ExecuteTemplate support x-script language ( Template script of the Exontrols ), like explained bellow:

The Template or x-script is composed by lines of instructions. Instructions are separated by "\n\r" ( newline characters ) or ";" character. The ; character may be available only for newer versions of the components.

An x-script instruction/line can be one of the following:

  • Dim list of variables Declares the variables. Multiple variables are separated by commas. ( Sample: Dim h, h1, h2 )
  • variable = property( list of arguments ) Assigns the result of the property to a variable. The "variable" is the name of a declared variable. The "property" is the property name of the object in the context. The "list or arguments" may include variables or values separated by commas. ( Sample: h = InsertItem(0,"New Child") )
  • property( list of arguments ) = value Changes the property. The value can be a variable, a string, a number, a boolean value or a RGB value.
  • method( list of arguments ) Invokes the method. The "list or arguments" may include variables or values separated by commas.
  • { Beginning the object's context. The properties or methods called between { and } are related to the last object returned by the property prior to { declaration.
  • } Ending the object's context
  • object. property( list of arguments ).property( list of arguments ).... The .(dot) character splits the object from its property. For instance, the Columns.Add("Column1").HeaderBackColor = RGB(255,0,0), adds a new column and changes the column's header back color.

The x-script may uses constant expressions as follow:

  • boolean expression with possible values as True or False
  • numeric expression may starts with 0x which indicates a hexa decimal representation, else it should starts with digit, or +/- followed by a digit, and . is the decimal separator. Sample: 13 indicates the integer 13, or 12.45 indicates the double expression 12,45
  • date expression is delimited by # character in the format #mm/dd/yyyy hh:mm:ss#. Sample: #31/12/1971# indicates the December 31, 1971
  • string expression is delimited by " or ` characters. If using the ` character, please make sure that it is different than ' which allows adding comments inline. Sample: "text" indicates the string text.

Also , the template or x-script code may support general functions as follows:

  • Me property indicates the original object.
  • RGB(R,G,B) property retrieves an RGB value, where the R, G, B are byte values that indicates the R G B values for the color being specified. For instance, the following code changes the control's background color to red: BackColor = RGB(255,0,0)
  • LoadPicture(file) property loads a picture from a file or from BASE64 encoded strings, and returns a Picture object required by the picture properties.
  • CreateObject(progID) property creates and retrieves a single uninitialized object of the class associated with a specified program identifier.


property ToolTipDelay

property Tab.ToolTipDelay as Long
Specifies the time in ms that passes before the ToolTip appears.

Type | Description
Long | A long expression that specifies the time in ms that passes before the ToolTip appears.

If the ToolTipDelay or ToolTipPopDelay property is 0, the control displays no tooltips. The ToolTipPopDelay property specifies the period in ms of time the ToolTip remains visible if the mouse pointer is stationary within a control. Use the ToolTipWidth property to specify the width of the tooltip window.


property ToolTipFont

property Tab.ToolTipFont as IFontDisp
Retrieves or sets the tooltip's font.

Type | Description
IFontDisp | A Font object being used to display the tooltip.
Use the ToolTipFont property to assign a font for the control's tooltip. The ToolTipPopDelay property specifies the period in ms of time the ToolTip remains visible if the mouse pointer is stationary within a control. Use the ToolTipWidth property to specify the width of the tooltip window.


property ToolTipPopDelay

property Tab.ToolTipPopDelay as Long
Specifies the period in ms of time the ToolTip remains visible if the mouse pointer is stationary within a control.

Type | Description
Long | A long expression that specifies the period in ms of time the ToolTip remains visible if the mouse pointer is stationary within a control.

If the ToolTipDelay or ToolTipPopDelay property is 0, the control displays no tooltips. The ToolTipDelay property specifies the time in ms that passes before the ToolTip appears. Use the ToolTipWidth property to specify the width of the tooltip window. Use the ToolTipFont property to assign a font for the control's tooltip.


property ToolTipWidth

property Tab.ToolTipWidth as Long
Specifies a value that indicates the width of the tooltip window, in pixels.

Type | Description
Long | A long expression that indicates the width of the tooltip window.

Use the ToolTipWidth property to change the tooltip window width. The height of the tooltip window is automatically computed based on tooltip's description. The ToolTipPopDelay property specifies the period in ms of time the ToolTip remains visible if the mouse pointer is stationary within a control. The ToolTipDelay property specifies the time in ms that passes before the ToolTip appears. Use the ToolTipFont property to assign a font for the control's tooltip.


property TopPictureRoot

property Tab.TopPictureRoot as Long
Specifies the indent of the picture on the root object.

Type | Description
Long | A long expression that specifies the indentation of the picture being displayed on the root object of the skin being applied to the TAB control.
Use the LeftPictureRoot and TopPictureRoot properties to display a specified part of the form's background picture. By default, the LeftPictureRoot and TopPictureRoot properties are updated as soon as the control moves in the form. The LeftPictureRoot and TopPictureRoot properties indicates in pixels the (top-left) corner of the TAB control relative to the form. These properties have effect only if the root object of the skin being applied to the control displays a picture. Use the Load method to load and apply a new skin file to the control. Use the Style property to apply a predefined style to the control.

The following screen shot shows the form with a picture on its background ( the form has no other controls in ):

The following screen shot shows the TAB control with no picture assigned to the root object of the skin:

The following screen shot shows the TAB control after we applied the same source picture on the root object of the skin ( Invoke the "Edit-Tab" item in design mode, Select the "Root" item, Select "Picture\Add New" in Background panel, and select the picture to be put on the root's background, Click the "Save", and close the designer )

In these cases, we have used the following picture to be put on the form's background as well as on the root object of the skin.


property Version

property Tab.Version as String
Retrieves the control's version.

Type | Description
String | A string expression that determines the control's version.

The Version property determines the control's version. The property is read only. For instance, the expression "1.0.2.3.DEMO.UNICODE" indicates that the version of the control is an UNICODE version of DEMO configuration.


TabBuilder object
Tip The /COM object can be placed on a HTML page (with usage of the HTML object tag: <object classid="clsid:...">) using the class identifier: {8ACDA509-50A7-456F-A714-FC81109FD611}. The object's program identifier is: "Exontrol.TabBuilder". The /COM object module is: "ExTab.dll"
The TabBuilder object helps to create new skin files being used by the Exontrol TAB component. The TabBuilder supports the following methods and properties:

Name | Description
Compress | Determines whether the builder compresses the file during saving.
Load | Loads the tab skin from a file.


property Compress

property TabBuilder.Compress as Boolean
Determines whether the builder compresses the file during saving.

Type | Description
Boolean | A boolean expression that determines whether the builder compresses the file during saving.

Use the Compress property to compress the skin files that holds the shape for TAB.


method Load

method TabBuilder.Load (FileName as String)
Loads a skin file to the builder.

Type | Description
FileName as String | A string expression that indicates the name of the file being loaded by the builder.

Use the Load method to load a skin file before showing the builder.


Tab events
Tip The /COM object can be placed on a HTML page (with usage of the HTML object tag: <object classid="clsid:...">) using the class identifier: {8ACDA509-50A7-456F-A714-FC81109FD611}. The object's program identifier is: "Exontrol.TabBuilder". The /COM object module is: "ExTab.dll"
The ExTab component supports the following events:

Name | Description
Activate | Fired when a new page is activated.
Click | Occurs when the user presses and then releases the left mouse button over the tree control.
DblClick | Occurs when the user dblclk the left mouse button over an object.
KeyDown | Occurs when the user presses a key while an object has the focus.
KeyPress | Occurs when the user presses and releases an ANSI key.
KeyUp | Occurs when the user releases a key while an object has the focus.
MouseDown | Occurs when the user presses a mouse button.
MouseLeave | Occurs once the cursor leaves the control.
MouseMove | Occurs when the user moves the mouse.
MouseUp | Occurs when the user releases a mouse button.


event Activate

event Activate (NewActive as Long, OldActive as Long)
Fired when a new page is activated.

Type | Description
NewActive as Long | A long expression that indicates the position of page being activated
OldActive as Long | A long expression that indicates the position of page being deactivated

The Activate event is fired when user changes the focused page. Use the Activate event to notify your application when a new page is activated. Use the Active property to change programmatically the focused page.

Syntax for Activate event, /COM version, on:

private void Activate(object sender, AxEXTABLib._ITabEvents_ActivateEvent e)
{
}

void OnActivate(long NewActive,long OldActive)
{
}

void __fastcall Activate(TObject *Sender,long NewActive,long OldActive)
{
}

procedure Activate(ASender: TObject; NewActive : Integer;OldActive : Integer);
begin
end;

procedure Activate(sender: System.Object; e: AxEXTABLib._ITabEvents_ActivateEvent);
begin
end;

begin event Activate(long NewActive,long OldActive)
end event Activate

Private Sub Activate(ByVal sender As System.Object, ByVal e As AxEXTABLib._ITabEvents_ActivateEvent) Handles Activate
End Sub

Private Sub Activate(ByVal NewActive As Long,ByVal OldActive As Long)
End Sub

Private Sub Activate(ByVal NewActive As Long,ByVal OldActive As Long)
End Sub

LPARAMETERS NewActive,OldActive

PROCEDURE OnActivate(oTab,NewActive,OldActive)
RETURN

Syntax for Activate event, /COM version (others), on:

<SCRIPT EVENT="Activate(NewActive,OldActive)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Activate(NewActive,OldActive)
End Function
</SCRIPT>

Procedure OnComActivate Integer llNewActive Integer llOldActive
    Forward Send OnComActivate llNewActive llOldActive
End_Procedure

METHOD OCX_Activate(NewActive,OldActive) CLASS MainDialog
RETURN NIL

void onEvent_Activate(int _NewActive,int _OldActive)
{
}

function Activate as v (NewActive as N,OldActive as N)
end function

function nativeObject_Activate(NewActive,OldActive)
return

For instance, the following sample changes the way how the caption of the focused page is displayed:

Private Sub Tab1_Activate(ByVal NewActive As Long, ByVal OldActive As Long)
    With Tab1.Pages
        If Not (OldActive = NewActive) Then
            .Item(OldActive).Caption = .Item(OldActive).UserData
        End If
        .Item(NewActive).UserData = .Item(NewActive).Caption
        .Item(NewActive).Caption = "<b><fgcolor=0000FF><u>" & .Item(NewActive).UserData & "</b>"
    End With
End Sub

The Activate handler applies built-in HTML format to focused page. The Activate handler saves the page's caption to UserData property before changing it, to restore the caption when the focused page is deactivated. Also, it is recommended calling the Tab1_Activate method when your form is loaded, because the Activate handler is not called right after form is loaded like in the following sample:

Private Sub Form_Load()
    Tab1_Activate Tab1.Active, Tab1.Active
End Sub


event Click ()
Occurs when the user presses and then releases the left mouse button over the tree control.

Type Description

The Click event is fired when the user releases the left mouse button over the control. Use a MouseDown or MouseUp event procedure to specify actions that will occur when a mouse button is pressed or released. Unlike the Click and DblClick events, MouseDown and MouseUp events lets you distinguish between the left, right, and middle mouse buttons. You can also write code for mouse-keyboard combinations that use the SHIFT, CTRL, and ALT keyboard modifiers.

Syntax for Click event, /COM version, on:

private void ClickEvent(object sender, EventArgs e)
{
}

void OnClick()
{
}

void __fastcall Click(TObject *Sender)
{
}

procedure Click(ASender: TObject; );
begin
end;

procedure ClickEvent(sender: System.Object; e: System.EventArgs);
begin
end;

begin event Click()
end event Click

Private Sub ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClickEvent
End Sub

Private Sub Click()
End Sub

Private Sub Click()
End Sub

LPARAMETERS nop

PROCEDURE OnClick(oTab)
RETURN

Syntax for Click event, /COM version (others), on:

<SCRIPT EVENT="Click()" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Click()
End Function
</SCRIPT>

Procedure OnComClick
    Forward Send OnComClick
End_Procedure

METHOD OCX_Click() CLASS MainDialog
RETURN NIL

void onEvent_Click()
{
}

function Click as v ()
end function

function nativeObject_Click()
return


event DblClick

event DblClick (Shift as Integer, X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS)
Occurs when the user dblclk the left mouse button over an object.

Type | Description
Shift as Integer | An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys.
X as OLE_XPOS_PIXELS | A single that specifies the current X location of the mouse pointer. The x values is always expressed in container coordinates.
Y as OLE_YPOS_PIXELS | A single that specifies the current Y location of the mouse pointer. The y values is always expressed in container coordinates.

Use the DblClick event to notify your application that user has dbl clicked the control. Use the PageFromPoint property to get the page from the cursor.

Syntax for DblClick event, /COM version, on:

private void DblClick(object sender, AxEXTABLib._ITabEvents_DblClickEvent e)
{
}

void OnDblClick(short Shift,long X,long Y)
{
}

void __fastcall DblClick(TObject *Sender,short Shift,int X,int Y)
{
}

procedure DblClick(ASender: TObject; Shift : Smallint;X : Integer;Y : Integer);
begin
end;

procedure DblClick(sender: System.Object; e: AxEXTABLib._ITabEvents_DblClickEvent);
begin
end;

begin event DblClick(integer Shift,long X,long Y)
end event DblClick

Private Sub DblClick(ByVal sender As System.Object, ByVal e As AxEXTABLib._ITabEvents_DblClickEvent) Handles DblClick
End Sub

Private Sub DblClick(Shift As Integer,X As Single,Y As Single)
End Sub

Private Sub DblClick(ByVal Shift As Integer,ByVal X As Long,ByVal Y As Long)
End Sub

LPARAMETERS Shift,X,Y

PROCEDURE OnDblClick(oTab,Shift,X,Y)
RETURN

Syntax for DblClick event, /COM version (others), on:

<SCRIPT EVENT="DblClick(Shift,X,Y)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function DblClick(Shift,X,Y)
End Function
</SCRIPT>

Procedure OnComDblClick Short llShift OLE_XPOS_PIXELS llX OLE_YPOS_PIXELS llY
    Forward Send OnComDblClick llShift llX llY
End_Procedure

METHOD OCX_DblClick(Shift,X,Y) CLASS MainDialog
RETURN NIL

void onEvent_DblClick(int _Shift,int _X,int _Y)
{
}

function DblClick as v (Shift as N,X as OLE::Exontrol.Tab.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.Tab.1::OLE_YPOS_PIXELS)
end function

function nativeObject_DblClick(Shift,X,Y)
return

The following sample prints the caption of the page that was dbl clicked:

Private Sub Tab1_DblClick(Shift As Integer, X As Single, Y As Single)
    With Tab1
        Dim p As Long
        p = .PageFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY)
        If (p >= 0) Then
            Debug.Print "The page " & .Pages(.Pages.PosToIndex(p)).Caption
        End If
    End With
End Sub


event KeyDown

event KeyDown (KeyCode as Integer, Shift as Integer)
Occurs when the user presses a key while an object has the focus.

Type | Description
KeyCode as Integer | An integer that represent the key code.
Shift as Integer | An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT are pressed, the value of shift is 6.
Use KeyDown and KeyUp event procedures if you need to respond to both the pressing and releasing of a key. You test for a condition by first assigning each result to a temporary integer variable and then comparing shift to a bit mask. Use the And operator with the shift argument to test whether the condition is greater than 0, indicating that the modifier was pressed, as in this example:

ShiftDown = (Shift And 1) > 0
CtrlDown = (Shift And 2) > 0
AltDown = (Shift And 4) > 0
In a procedure, you can test for any combination of conditions, as in this example:
If AltDown And CtrlDown Then

Syntax for KeyDown event, /COM version, on:

private void KeyDownEvent(object sender, AxEXTABLib._ITabEvents_KeyDownEvent e)
{
}

void OnKeyDown(short FAR* KeyCode,short Shift)
{
}

void __fastcall KeyDown(TObject *Sender,short * KeyCode,short Shift)
{
}

procedure KeyDown(ASender: TObject; var KeyCode : Smallint;Shift : Smallint);
begin
end;

procedure KeyDownEvent(sender: System.Object; e: AxEXTABLib._ITabEvents_KeyDownEvent);
begin
end;

begin event KeyDown(integer KeyCode,integer Shift)
end event KeyDown

Private Sub KeyDownEvent(ByVal sender As System.Object, ByVal e As AxEXTABLib._ITabEvents_KeyDownEvent) Handles KeyDownEvent
End Sub

Private Sub KeyDown(KeyCode As Integer,Shift As Integer)
End Sub

Private Sub KeyDown(KeyCode As Integer,ByVal Shift As Integer)
End Sub

LPARAMETERS KeyCode,Shift

PROCEDURE OnKeyDown(oTab,KeyCode,Shift)
RETURN

Syntax for KeyDown event, /COM version (others), on:

<SCRIPT EVENT="KeyDown(KeyCode,Shift)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function KeyDown(KeyCode,Shift)
End Function
</SCRIPT>

Procedure OnComKeyDown Short llKeyCode Short llShift
    Forward Send OnComKeyDown llKeyCode llShift
End_Procedure

METHOD OCX_KeyDown(KeyCode,Shift) CLASS MainDialog
RETURN NIL

void onEvent_KeyDown(COMVariant /*short*/ _KeyCode,int _Shift)
{
}

function KeyDown as v (KeyCode as N,Shift as N)
end function

function nativeObject_KeyDown(KeyCode,Shift)
return


event KeyPress

event KeyPress (KeyAscii as Integer)
Occurs when the user presses and releases an ANSI key.

Type | Description
KeyAscii as Integer | An integer that returns a standard numeric ANSI keycode.

The KeyPress event lets you immediately test keystrokes for validity or for formatting characters as they are typed. Changing the value of the keyascii argument changes the character displayed. Use KeyDown and KeyUp event procedures to handle any keystroke not recognized by KeyPress, such as function keys, editing keys, navigation keys, and any combinations of these with keyboard modifiers. Unlike the KeyDown and KeyUp events, KeyPress does not indicate the physical state of the keyboard; instead, it passes a character. KeyPress interprets the uppercase and lowercase of each character as separate key codes and, therefore, as two separate characters.

Syntax for KeyPress event, /COM version, on:

private void KeyPressEvent(object sender, AxEXTABLib._ITabEvents_KeyPressEvent e)
{
}

void OnKeyPress(short FAR* KeyAscii)
{
}

void __fastcall KeyPress(TObject *Sender,short * KeyAscii)
{
}

procedure KeyPress(ASender: TObject; var KeyAscii : Smallint);
begin
end;

procedure KeyPressEvent(sender: System.Object; e: AxEXTABLib._ITabEvents_KeyPressEvent);
begin
end;

begin event KeyPress(integer KeyAscii)
end event KeyPress

Private Sub KeyPressEvent(ByVal sender As System.Object, ByVal e As AxEXTABLib._ITabEvents_KeyPressEvent) Handles KeyPressEvent
End Sub

Private Sub KeyPress(KeyAscii As Integer)
End Sub

Private Sub KeyPress(KeyAscii As Integer)
End Sub

LPARAMETERS KeyAscii

PROCEDURE OnKeyPress(oTab,KeyAscii)
RETURN

Syntax for KeyPress event, /COM version (others), on:

<SCRIPT EVENT="KeyPress(KeyAscii)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function KeyPress(KeyAscii)
End Function
</SCRIPT>

Procedure OnComKeyPress Short llKeyAscii
    Forward Send OnComKeyPress llKeyAscii
End_Procedure

METHOD OCX_KeyPress(KeyAscii) CLASS MainDialog
RETURN NIL

void onEvent_KeyPress(COMVariant /*short*/ _KeyAscii)
{
}

function KeyPress as v (KeyAscii as N)
end function

function nativeObject_KeyPress(KeyAscii)
return


event KeyUp

event KeyUp (KeyCode as Integer, Shift as Integer)
Occurs when the user releases a key while an object has the focus.

Type | Description
KeyCode as Integer | An integer that represent the key code.
Shift as Integer | An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. The shift argument is a bit field with the least-significant bits corresponding to the SHIFT key (bit 0), the CTRL key (bit 1), and the ALT key (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT are pressed, the value of shift is 6.

Use the KeyUp event procedure to respond to the releasing of a key.

Syntax for KeyUp event, /COM version, on:

private void KeyUpEvent(object sender, AxEXTABLib._ITabEvents_KeyUpEvent e)
{
}

void OnKeyUp(short FAR* KeyCode,short Shift)
{
}

void __fastcall KeyUp(TObject *Sender,short * KeyCode,short Shift)
{
}

procedure KeyUp(ASender: TObject; var KeyCode : Smallint;Shift : Smallint);
begin
end;

procedure KeyUpEvent(sender: System.Object; e: AxEXTABLib._ITabEvents_KeyUpEvent);
begin
end;

begin event KeyUp(integer KeyCode,integer Shift)
end event KeyUp

Private Sub KeyUpEvent(ByVal sender As System.Object, ByVal e As AxEXTABLib._ITabEvents_KeyUpEvent) Handles KeyUpEvent
End Sub

Private Sub KeyUp(KeyCode As Integer,Shift As Integer)
End Sub

Private Sub KeyUp(KeyCode As Integer,ByVal Shift As Integer)
End Sub

LPARAMETERS KeyCode,Shift

PROCEDURE OnKeyUp(oTab,KeyCode,Shift)
RETURN

Syntax for KeyUp event, /COM version (others), on:

<SCRIPT EVENT="KeyUp(KeyCode,Shift)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function KeyUp(KeyCode,Shift)
End Function
</SCRIPT>

Procedure OnComKeyUp Short llKeyCode Short llShift
    Forward Send OnComKeyUp llKeyCode llShift
End_Procedure

METHOD OCX_KeyUp(KeyCode,Shift) CLASS MainDialog
RETURN NIL

void onEvent_KeyUp(COMVariant /*short*/ _KeyCode,int _Shift)
{
}

function KeyUp as v (KeyCode as N,Shift as N)
end function

function nativeObject_KeyUp(KeyCode,Shift)
return


event MouseDown

event MouseDown (Button as Integer, Shift as Integer, X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS)
Occurs when the user presses a mouse button.

Type | Description
Button as Integer | An integer that identifies the button that was pressed to cause the event
Shift as Integer | An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the button argument is pressed or released.
X as OLE_XPOS_PIXELS | A single that specifies the current X location of the mouse pointer. The X value is always expressed in container coordinates.
Y as OLE_YPOS_PIXELS | A single that specifies the current Y location of the mouse pointer. The Y value is always expressed in container coordinates.

Use a MouseDown or MouseUp event procedure to specify actions that will occur when a mouse button is pressed or released. Unlike the Click and DblClick events, MouseDown and MouseUp events lets you distinguish between the left, right, and middle mouse buttons. You can also write code for mouse-keyboard combinations that use the SHIFT, CTRL, and ALT keyboard modifiers. If you need to notify your application that a new page was activated you the Activate event instead. Use the PageFromPoint property to get the page over the cursor.

Syntax for MouseDown event, /COM version, on:

private void MouseDownEvent(object sender, AxEXTABLib._ITabEvents_MouseDownEvent e)
{
}

void OnMouseDown(short Button,short Shift,long X,long Y)
{
}

void __fastcall MouseDown(TObject *Sender,short Button,short Shift,int X,int Y)
{
}

procedure MouseDown(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
end;

procedure MouseDownEvent(sender: System.Object; e: AxEXTABLib._ITabEvents_MouseDownEvent);
begin
end;

begin event MouseDown(integer Button,integer Shift,long X,long Y)
end event MouseDown

Private Sub MouseDownEvent(ByVal sender As System.Object, ByVal e As AxEXTABLib._ITabEvents_MouseDownEvent) Handles MouseDownEvent
End Sub

Private Sub MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
End Sub

Private Sub MouseDown(ByVal Button As Integer,ByVal Shift As Integer,ByVal X As Long,ByVal Y As Long)
End Sub

LPARAMETERS Button,Shift,X,Y

PROCEDURE OnMouseDown(oTab,Button,Shift,X,Y)
RETURN

Syntax for MouseDown event, /COM version (others), on:

<SCRIPT EVENT="MouseDown(Button,Shift,X,Y)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function MouseDown(Button,Shift,X,Y)
End Function
</SCRIPT>

Procedure OnComMouseDown Short llButton Short llShift OLE_XPOS_PIXELS llX OLE_YPOS_PIXELS llY
    Forward Send OnComMouseDown llButton llShift llX llY
End_Procedure

METHOD OCX_MouseDown(Button,Shift,X,Y) CLASS MainDialog
RETURN NIL

void onEvent_MouseDown(int _Button,int _Shift,int _X,int _Y)
{
}

function MouseDown as v (Button as N,Shift as N,X as OLE::Exontrol.Tab.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.Tab.1::OLE_YPOS_PIXELS)
end function

function nativeObject_MouseDown(Button,Shift,X,Y)
return

The following sample prints the page from the cursor:

Private Sub Tab1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With Tab1
        Dim p As Long
        p = .PageFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY)
        If (p >= 0) Then
            Debug.Print "The page " & .Pages(.Pages.PosToIndex(p)).Caption
        End If
    End With
End Sub


event MouseLeave ()
Occurs once the cursor leaves the control.

Type Description
The MouseLeave event occurs once the cursor leaves the control. The MouseLeave event occurs when the cursor leaves the current window and enters to another window. For instance, the MouseLeave event occurs once the cursor leaves the Page and enters a child control of the Page.

The following sample underlines the page's caption while cursor hovers it :

Dim iHot

Private Sub Unhover(ByVal i As Long)
    With Tab1
        If (i >= 0) Then
            .Pages(i).Caption = Replace(.Pages(i).Caption, "<u><fgcolor=666666>", "")
        End If
    End With
End Sub

Private Sub Hover(ByVal i As Long)
    With Tab1
        iHot = i
        If (i >= 0) Then
            .Pages(i).Caption = "<u><fgcolor=666666>" + .Pages(i).Caption
        End If
    End With
End Sub

Private Sub Tab1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim i
    With Tab1
        i = .PageFromPoint(-1, -1)
        If (Not iHot = i) Then
            Unhover (iHot)
            iHot = i
            If Not (i = .Active) Then
                Hover (iHot)
            End If
        End If
    End With
End Sub

Private Sub Tab1_Activate(ByVal NewActive As Long, ByVal OldActive As Long)
    If (NewActive = iHot) Then
        Unhover iHot
        iHot = -1
    End If
End Sub

Private Sub Tab1_MouseLeave()
    If (iHot >= 0) Then
        Unhover iHot
        iHot = -1
    End If
End Sub


event MouseMove

event MouseMove (Button as Integer, Shift as Integer, X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS)
Occurs when the user moves the mouse.

Type | Description
Button as Integer | An integer that corresponds to the state of the mouse buttons in which a bit is set if the button is down.
Shift as Integer | An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys.
X as OLE_XPOS_PIXELS | A single that specifies the current X location of the mouse pointer. The x values is always expressed in container coordinates
Y as OLE_YPOS_PIXELS | A single that specifies the current Y location of the mouse pointer. The y values is always expressed in container coordinates
The MouseMove event is generated continually as the mouse pointer moves across objects. Unless another object has captured the mouse, an object recognizes a MouseMove event whenever the mouse position is within its borders. Use the PageFromPoint property to get the page over the cursor.

Syntax for MouseMove event, /COM version, on:

private void MouseMoveEvent(object sender, AxEXTABLib._ITabEvents_MouseMoveEvent e)
{
}

void OnMouseMove(short Button,short Shift,long X,long Y)
{
}

void __fastcall MouseMove(TObject *Sender,short Button,short Shift,int X,int Y)
{
}

procedure MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
end;

procedure MouseMoveEvent(sender: System.Object; e: AxEXTABLib._ITabEvents_MouseMoveEvent);
begin
end;

begin event MouseMove(integer Button,integer Shift,long X,long Y)
end event MouseMove

Private Sub MouseMoveEvent(ByVal sender As System.Object, ByVal e As AxEXTABLib._ITabEvents_MouseMoveEvent) Handles MouseMoveEvent
End Sub

Private Sub MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
End Sub

Private Sub MouseMove(ByVal Button As Integer,ByVal Shift As Integer,ByVal X As Long,ByVal Y As Long)
End Sub

LPARAMETERS Button,Shift,X,Y

PROCEDURE OnMouseMove(oTab,Button,Shift,X,Y)
RETURN

Syntax for MouseMove event, /COM version (others), on:

<SCRIPT EVENT="MouseMove(Button,Shift,X,Y)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function MouseMove(Button,Shift,X,Y)
End Function
</SCRIPT>

Procedure OnComMouseMove Short llButton Short llShift OLE_XPOS_PIXELS llX OLE_YPOS_PIXELS llY
    Forward Send OnComMouseMove llButton llShift llX llY
End_Procedure

METHOD OCX_MouseMove(Button,Shift,X,Y) CLASS MainDialog
RETURN NIL

void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y)
{
}

function MouseMove as v (Button as N,Shift as N,X as OLE::Exontrol.Tab.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.Tab.1::OLE_YPOS_PIXELS)
end function

function nativeObject_MouseMove(Button,Shift,X,Y)
return

The following sample underlines the page's caption while cursor hovers it :

Dim iHot

Private Sub Unhover(ByVal i As Long)
    With Tab1
        If (i >= 0) Then
            .Pages(i).Caption = Replace(.Pages(i).Caption, "<u><fgcolor=666666>", "")
        End If
    End With
End Sub

Private Sub Hover(ByVal i As Long)
    With Tab1
        iHot = i
        If (i >= 0) Then
            .Pages(i).Caption = "<u><fgcolor=666666>" + .Pages(i).Caption
        End If
    End With
End Sub

Private Sub Tab1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim i
    With Tab1
        i = .PageFromPoint(-1, -1)
        If (Not iHot = i) Then
            Unhover (iHot)
            iHot = i
            If Not (i = .Active) Then
                Hover (iHot)
            End If
        End If
    End With
End Sub

Private Sub Tab1_Activate(ByVal NewActive As Long, ByVal OldActive As Long)
    If (NewActive = iHot) Then
        Unhover iHot
        iHot = -1
    End If
End Sub

Private Sub Tab1_MouseLeave()
    If (iHot >= 0) Then
        Unhover iHot
        iHot = -1
    End If
End Sub

The following sample prints the page's key over the cursor:

Private Sub Tab1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With Tab1
        Dim p As Long
        p = .PageFromPoint(-1, -1)
        If (p >= 0) Then
            Debug.Print "The cursor is over the page '" & .Pages(.Pages.PosToIndex(p)).Key & "'"
        End If
    End With
End Sub


event MouseUp

event MouseUp (Button as Integer, Shift as Integer, X as OLE_XPOS_PIXELS, Y as OLE_YPOS_PIXELS)
Occurs when the user releases a mouse button.

Type | Description
Button as Integer | An integer that identifies the button that was pressed to cause the event.
Shift as Integer | An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the button argument is pressed or released.
X as OLE_XPOS_PIXELS | A single that specifies the current X location of the mouse pointer. The x values is always expressed in container coordinates.
Y as OLE_YPOS_PIXELS | A single that specifies the current Y location of the mouse pointer. The y values is always expressed in container coordinates.

Use a MouseDown or MouseUp event procedure to specify actions that will occur when a mouse button is pressed or released. Unlike the Click and DblClick events, MouseDown and MouseUp events lets you distinguish between the left, right, and middle mouse buttons. You can also write code for mouse-keyboard combinations that use the SHIFT, CTRL, and ALT keyboard modifiers. Use the Activate event if your application needs to be notified when a new page is activated. Use the PageFromPoint property to get the page from the cursor.

Syntax for MouseUp event, /COM version, on:

private void MouseUpEvent(object sender, AxEXTABLib._ITabEvents_MouseUpEvent e)
{
}

void OnMouseUp(short Button,short Shift,long X,long Y)
{
}

void __fastcall MouseUp(TObject *Sender,short Button,short Shift,int X,int Y)
{
}

procedure MouseUp(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
end;

procedure MouseUpEvent(sender: System.Object; e: AxEXTABLib._ITabEvents_MouseUpEvent);
begin
end;

begin event MouseUp(integer Button,integer Shift,long X,long Y)
end event MouseUp

Private Sub MouseUpEvent(ByVal sender As System.Object, ByVal e As AxEXTABLib._ITabEvents_MouseUpEvent) Handles MouseUpEvent
End Sub

Private Sub MouseUp(Button As Integer,Shift As Integer,X As Single,Y As Single)
End Sub

Private Sub MouseUp(ByVal Button As Integer,ByVal Shift As Integer,ByVal X As Long,ByVal Y As Long)
End Sub

LPARAMETERS Button,Shift,X,Y

PROCEDURE OnMouseUp(oTab,Button,Shift,X,Y)
RETURN

Syntax for MouseUp event, /COM version (others), on:

<SCRIPT EVENT="MouseUp(Button,Shift,X,Y)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function MouseUp(Button,Shift,X,Y)
End Function
</SCRIPT>

Procedure OnComMouseUp Short llButton Short llShift OLE_XPOS_PIXELS llX OLE_YPOS_PIXELS llY
    Forward Send OnComMouseUp llButton llShift llX llY
End_Procedure

METHOD OCX_MouseUp(Button,Shift,X,Y) CLASS MainDialog
RETURN NIL

void onEvent_MouseUp(int _Button,int _Shift,int _X,int _Y)
{
}

function MouseUp as v (Button as N,Shift as N,X as OLE::Exontrol.Tab.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.Tab.1::OLE_YPOS_PIXELS)
end function

function nativeObject_MouseUp(Button,Shift,X,Y)
return

The following sample prints the page from the cursor:

Private Sub Tab1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    With Tab1
        Dim p As Long
        p = .PageFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY)
        If (p >= 0) Then
            Debug.Print "The page " & .Pages(.Pages.PosToIndex(p)).Caption
        End If
    End With
End Sub


TabBuilder events
Tip The /COM object can be placed on a HTML page (with usage of the HTML object tag: <object classid="clsid:...">) using the class identifier: {8ACDA509-50A7-456F-A714-FC81109FD611}. The object's program identifier is: "Exontrol.TabBuilder". The /COM object module is: "ExTab.dll"
The TabBuilder component has no available events.

Name Description


eXontrol Software - ExTab ActiveX Control - How to build my OWN tab?

How to build my OWN tab?

The Exontrol Tab library installs the TabBuilder component ( Exontrol.TabBuilder is the control's identifier ) that helps you to build new tab controls. Before showing how you can build your own tab control, we have to review for a bit how the TabBuilder can be used. If you already know how to use the TabBuilder component click here to see how to start your own tab control.

  • If you are a VB developer, click the 'Toolbox' panel, and choose the 'Components' from the panel's context menu. Once that you check and apply the 'ExTab 1.0 Control Library' from the opened dialog, your 'Toolbox' panel will include two new components: Tab [image] and TabBuilder [image].
  • If you are a VC developer, select the dialog where you want to insert the component, select 'Insert ActiveX Control' from its context menu, and dbl click the 'ExTabBuilder ActiveX Control' item in the opened dialog.

Once that you have inserted a TabBuilder component to a form or dialog, you are ready to build new tab controls. Of course, you can use the TabBuilder component to load and change already saved tab controls. When the form that contains a TabBuilder component is opened, the TabBuilder component automatically shows the 'Zoom' and 'Properties' panels. The 'Zoom' panel helps user to magnify different portions of the screen. The 'Properties' panel contains information like, background color, background picture for the selected object.

The TabBuilder component looks like following:

The TabBuilder's toolbox contains the following buttons:

New Tab | Creates a new file.
Open | Opens a file.
Save | Saves the content to a file, or update the component when the builder was opened using 'Edit tab' context item menu. ''Save As , if you are pressing the 'Shift' key while clicking the 'Save' button you can choose a new file where to save the tab's content.
Properties | A check button that indicates whether the 'Properties' panel is visible or hidden. The 'Properties' panel holds information about background of the selected object. Also, the the 'Properties' panel contains the entire list of pictures used by the skin. Details here.
Zoom | A check button that specifies whether the 'Zoom' panel is visible or hidden. You can use the 'Zoom' panel to magnify different portions of screen. In order to visualize a specified portion of the screen you can press "CTRL" key while moving the mouse, or you can click into the 'Zoom' window and drag the focused rectangle to the area being magnified.
Test | A simple button that opens a new window where you can see the tab control in runtime mode. If you are doing changes to the tab's content you can click the Test button to see how the Tab control will act in runtime environment.
Lines | A check button that indicates whether the TabBuilder draws the grid lines around different objects. The grid lines are not painted in the Tab control when it is running.
Alignment | A set of six radio buttons that indicates the object's alignment relative to its parent. The list of radio buttons in their listed order is: None, Left, Right, Client, Top and Bottom. For instance, if an object has the Left Alignment, that means that the object shares the left area of the parent with itself. The object's coordinates are defined in the edit controls labeled: X, Y, CX and CY. The edit controls that handle coordinates are enabled based on the object's alignment. For instance, if the object's alignment is left, only the CX coordinate will be enabled, or if the object's alignment is Client, then all coordinates are enabled. The coordinates are relative to the parent object, and they may contain arithmetic expressions, and % sign as well.
New Object | Creates a new child object. The newly created object is child of the selected object. By default, the newly created object has no picture or color associated to it. You have to define the object's background using the 'Properties' panel. You can also, insert a new child object whild TabBuilder is focused by pressing the 'Insert' key.
Delete | Deletes an object. Also, you can remove the selected object by pressing the 'Delete' key. Note, that some objects are not allowed to be deleted, because they define how the TAB control looks like.

The TabBuilder's client area shows the main objects that define a tab control like follows:

Area where the TAB control draws the pages of the Tab control. The area must define the looks for the FOCUS page as well for a NORMAL page. The TAB control uses the FOCUS page when painting the focused ( activated ) page of the tab control. The NORMAL page is used by the control when painting all other pages that are not focused or activated. The way how you define these objects is how your TAB control will look like. Important to note is that the FOCUS and NORMAL objects ( pages ) are separated by an object that defines the distance between pages. The distance is used by the TAB control when painting the pages. The width of this object may contain negative numbers as well, if you have some kind of overriding in your tab control.
The TAB's client area. The top and bottom borders define also the height of the overriding area when TAB is running. The way how you define this object is the way how the TAB's client area will look like in the runtime mode.

Notes:

  • the selected object is always marked using markers.
  • any change in the 'Properties' panel will be reflected in the selected object.
  • use 'Up' key to select the parent of the selected object, while the TabBuilder is focused.
  • use the 'Down' key to select the first child of the selected object, while the TabBuilder is focused.
  • use the 'Left' or 'Right' key to move through the objects that have the same parent as selected object.
  • you can change the order of the objects ( that have the same parent ) using combination of CTRL + PgUp or CTRL + PgDn key.

The 'Properties' panel is a resizable window that's visible only if the [image] button is pressed. The caption of its window is 'Background'. The 'Properties' panel is always updated when the selected object is changed. The 'Properties' panel defines the list of pictures used by the skin. The 'Properties' panel looks like follows:

Use the Picture menu to insert, delete a picture object from the skin file. Note that all picture files are saved to the skin file ( tab file ), no matter if they are used or not. The TabBuilder compresses the file, so even if you are using a bitmap file or a gif file, the file of the tab will be compressed! The 'Properties''s toolbox contains the following buttons ( in their order ):

A set of two radio buttons that defines the way how the picture is displayed on the selected object: tiled or stretched.
A set of three radio buttons that defines the picture's transparency. If the first button is pressed, the picture is opaque, so no transparent colors are used. If the second button is pressed, the picture is transparent. No picture or background is applied to the selected object. If the third button is pressed, the last two buttons defines the transparent color from and transparent color to. In order to select a new transparent color, you have to click on the one of the last two buttons and drag to the desired color. Once that you have selected a transparency color, you have to presses the button again to apply the transparent color to the selected object.
Defines a set of predefined colors. The X button clears the background color of the selected object. The bottom-right button ( bellow to X button ), helps user to add a custom color. How? Click the button and drag to desired color. Once that you have selected a custom color, you can presses the button again to apply the color to the selected object.
The X, Y, CX, CY edit controls define the coordinates of the picture on the background of the selected object.

Now, that we are ready to go, we will show you how to create a new TAB control that looks like follows using the TabBuilder component:

Run the form that contains the TabBuilder, and click the file new button in order to create a new tab file.

Step 1. Processing the picture. So, before starting we need to work on the picture to eliminate all things that we don't need it, like texts, colors, tabs and so on. We used mspaint application, but you can use any image processing tool that you want. So, the template picture becomes:

We have used red color, because we want to use RED color as a transparent color, but you can pick up any color that you want.

Step 2. Load the picture. Click the Picture menu on the 'Properties' panel, select the Add New menu item, and select the file saved to Step 1. Click the 'Open' button, and the TabBuiler will load the picture. Click the 'None' item in the 'Properties' panel, because the selected object is exactly the client area of the TAB control, and the picture is tiled on its background. We changed the main object's background color, using the 'Up' key until we reached the root object, and after that we have selected the menu color in the custom color button. After all these your builder should look like follows:

Step 3. Building the FOCUS page. Now, we have to work on how the FOCUS page should look like. We will use the RED color as transparent color, and after we done the FOCUS object the builder should look like:

Step 3. Building the NORMAL page. Because in that case the FOCUS and NORMAL page look the same, we just do the same thing as we did for the FOCUSED page. SO, the next step should look like follows:

Step 4. Building the borders for the client area. The client area is designed like follows:

Step 4. Test. We are ready now to check our tab control. All that we need to do is to click the [image] button, and we have now the:

Step 5. Correction and adjustments. As we can see the distance between pages is a bit larger, and we have a distortion on the top-left side. We are going to select the object between FOCUS and NORMAL pages and we have to set the distance to -2 like follows:

Finally our TAB control will look like follows:

Of course, between steps it is recommended saving the skin file, using the [image] (save) button. Here's the simple.etb file that was obtained by doing the steps mentioned above.


eXontrol Software - ExTab ActiveX Control - How do I add new pages on desing mode?

How do I add new pages on desing mode?

The ExTab component supports WYSWYG Template/Layout Editor. The Template editor helps user to add new pages to the control. You can invoke the Template editor by doing the following:

  • select the control in design mode
  • open the control's context menu, by right clicking the control while selected
  • select 'Properties' item from object's context menu.
  • select 'Template' page

The Template Editor looks like follows:

In the left side, you can see a ExTab control running. The edit control on the right side help user to change the ExTab look and feel using the X-Language. As you can see from the picture, theere are two pages Tab 1, and Tab 2. If you need to add a new tab control, you can copy and paste the last Add context like follows:

Add("Tab 3", "Tab3", 3)
{
UserData = "Associates an extra data to the page"
}

where the first argument of Add method is the name of the page, the second is the key of the page, and the third parameter is the index of icon used. If you are not using icons, this parameter can be ignored. SO, once that you added the above code, the template looks like follows:

As you can see a new page was added to the left side control. After you click the Apply button, the template will be applied to the original control, and so, you have new page added.


TemplatePage object
The TemplatePage object is only for internal use.

Name Description


eXontrol Software - ExTab ActiveX Control - Did you try the TabBuilder?

Did you try the TabBuilder?

This page includes an Exontrol TabBuilder component that helps you to build new skins for your TAB control.

  • Click the [image] button to check your TAB control.
  • Click the [image] button and open an etb file.
  • Click the [image] button and press the SHIFT key to have Save As...
  • If you are clicking an object, it becomes selected. If you want to select its parent object you can use the 'Up' key. If you are trying to access the child objects use the 'Down' key that selects the first child object. Use the 'Left' and 'Right' keys to navigate through the objects with the same parent.
  • You can order the position of objects that have the same parent by using the combination CTRL + Page Up, or CTRL + Page Down.
  • You can insert a new child object by pressing the 'Insert' key
  • You can delete an object if you are pressing the 'Delete' key.
  • Click the Zoom window and drag the focused rectangle to desired position on the screen to magnify the area.
  • Click the [image] button to show or hide the grid lines.