Profile Picture

NTabControl mouse events

Posted By Stephen White 15 Years Ago
Author
Message
Stephen White
Posted 15 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 15 Years Ago
Posts: 2, Visits: 1
Hi Angel,

Many thanks for the reply; this is giving me exactly the result I was looking for! Thanks again.

Steve W.

Angel Chorbadzhiev
Posted 15 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hello Stephen,

The NTabControl doesn't handle MouseUp event.

However there is one workaround you can use.

The part of NTabControl where the tabs are actually is NTabStrip control, which handles MouseUp.

This NTabSrtip is not exposed in NTabControl but it is actually the first control in NTabControl.Controls collection, so you can do the following:

NTabStrip tabStrip = nTabControl1.Controls[0] as NTabStrip;

if (tabStrip != null)

{

    tabStrip.MouseUp += new MouseEventHandler(tabStrip_MouseUp);

}

I hope this approach will help you to attach to MouseUp event.

Regards,

Angel.

 



Stephen White
Posted 15 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 15 Years Ago
Posts: 2, Visits: 1
I am trying to show an NContextMenu in response to the MouseUp event in the 'button' region of an NTabControl, however mouse events do not appear to fire in this region. Is there some property or method I need to use to get mouse events to fire here, or is this behaviour 'by design'?



Similar Topics


Reading This Topic