Search
TabControl.tabHeaderDraw Event
See Also
 






Raised when a tab header is drawn.

Namespace: MindFusion.Common.UI
File: TabControl.js

 Syntax

JavaScript  Copy Code

EventDispatcher tabHeaderDraw

 Event Data

The event handler method receives the following arguments:
sender
A TabPage instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
An ItemEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.

 Example

The following code creates a new instance of the TabControl class using a reference to an HTMLElement called tabcontrol. It handles the tabHeaderDraw event where it uses the rawEventArgs parameter to access the style object of the HTML Element that corresponds to the tab header being drawn:

JavaScript  Copy Code

// create a new instance of the TabControl control
var tabControl = new ui.TabControl(document.getElementById("tabcontrol"));
tabControl.width = tabControl.height = new ui.Unit(100, ui.UnitType.Percent);
tabControl.theme = "standard";
tabControl.tabHeaderDraw.addEventListener(handleTabHeaderDraw);

...........................
...........................

function handleTabHeaderDraw(sender, args)
{
  args.rawEventargs.style.background = "yellow";
}

 See Also