Version

MouseOut Property (TabClientEvents)

Gets sets name of javascript function which is called when mouse is moved out of tab, close button or scroll button.
Syntax
'Declaration
 
Public Property MouseOut As String
public string MouseOut {get; set;}
Remarks
Action (change of image or css class) of that event can be canceled. Second param in handler is instance of TabMouseEventArgs class, which provides information about TabItem or scroll button involved in event.
Example
Me.WebTab1.ClientEvents.MouseOut = "WebTab1_MouseOut"
this.WebTab1.ClientEvents.MouseOut = "WebTab1_MouseOut";
// The client event MouseOut takes two parameters sender and e
        // sender  is the object which is raising the event
        // e is the TabMouseEventArgs

        function WebTab1_MouseOut(sender, e) {

            var tab =sender;

            //Gets the index of the tab involved in the MouseOut event
            var tabIndex = e.get_tabIndex();

            //Gets index of scroll button involved in mouse event. 
            //Possible values: 0 - right or top scroll button, 1 - left or bottom scroll button,
            // -1 - it is event over tab item or add-new-tab button
            var scrollButtonIndex = e.get_scrollButtonIndex();

//Assuming you have a label called labelOutput on the form
            var label = $get('labelOutput');


            if (e.isAddNewTabButton()) {

                label.innerHTML = "Mouse out of add new tab button";
            }
            else if (e.isCloseButton()) {
                label.innerHTML = "Mouse out of close button with tab index" + tabIndex;
            }
            else
                if (tabIndex != -1) {

                label.innerHTML = "Mouse out of the tab with index '" + tabIndex + "'";
            }
            else {

                if (scrollButtonIndex == 0) {
                    label.innerHTML = "Mouse out of the right scroll button";
                }
                else
                    label.innerHTML = "Mouse out of the left scroll button";
            }    


        }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also