Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - C# Tab Control HitTest
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

C# Tab Control HitTest

 Post Reply Post Reply
Author
Message
pchui View Drop Down
Newbie
Newbie


Joined: 09 March 2005
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote pchui Quote  Post ReplyReply Direct Link To This Post Topic: C# Tab Control HitTest
    Posted: 27 October 2005 at 7:19pm

I'm trying to detect the TabControlItem clicked on by handling the TabControl.MouseUpEvent and then checking TabControl.HitTest(). It never succeeds because it appears that there needs to be a conversion from the MouseUpEvent x,y units to the one that HitTest() uses.

In the TabManager sample, I added the event handler

private void TabControl_MouseUpEvent(object sender, AxXtremeSuiteControls._DTabControlEvents_MouseUpEvent e)
{
    XtremeSuiteControls.TabControlItem item = TabControl.HitTest(e.x, e.y);
    if (item != null)
    {
     ...
    }
}

HitTest() always return null here. The e.y value from the MouseUpEvent is in the range of 0-16.

I tried the same code in VB, and it works. But the MouseUpEvent in VB returns y values of 0-300.

My tests with C++ show the same problem as C#.

 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.