Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Column-depending ContextMenu

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
phil



Joined: 12 May 2006
Posts: 1

PostPosted: Fri May 12, 2006 2:25 pm    Post subject: Column-depending ContextMenu Reply with quote

Dear Support

I have to show a ContextMenu depending on the Row and the Column. Is there any way to get the Column as well as the Row from the GetContextMenuEventArgs?

tree_GetContextMenu(object sender, GetContextMenuEventArgs e)
{
// how to get the col?
}

Thanx
Philipp
Back to top
View user's profile Send private message MSN Messenger
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri May 12, 2006 11:21 pm    Post subject: Reply with quote

You can't get the column directly from the event args. But you can find it out by getting the widget currently under the mouse. If this is a CellWidget then you get the column from it eg

Code:
private void _virtualTree_GetContextMenu(object sender, GetContextMenuEventArgs e)
{
    Point pos = this.PointToClient(Control.MousePosition);
    Widget widget = _virtualTree.GetWidget(pos.X, pos.Y);
    if (widget is CellWidget)
    {
        Column column = (widget as CellWidget).Column;
    }
}

_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group