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 

CellMouseDown in tree Version 3.14.0

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



Joined: 22 Oct 2009
Posts: 5

PostPosted: Fri Dec 04, 2009 11:33 am    Post subject: CellMouseDown in tree Version 3.14.0 Reply with quote

Dear Infralution,

Why tree.SelectedItem is null in the tree.CellMouseDown event with Version 3.14.0?
I generate the dynamic tree.ContextMenuStrip in the tree.CellMouseDown event with Version 3.5.0, use the tree.SelectedItem != row.Item to prevent they are not same in case,i mean the tree does not select the new location row when CellMouseDown event fire,then tree.SelectedItem is still the last row. but now with the new tree version, it doesn't work. here some example codes:
private void tree_CellMouseDown(object sender, MouseEventArgs e)
{
CPLMainViewSet.isRightClick = false;
Column col = ((CellWidget)sender).Column;
Row row = ((CellWidget)sender).Row;
if (row == null || col == null) return;
if (e.Button == MouseButtons.Right)
{
if (tree.SelectedItem != row.Item) // Now the tree.SelectedItem is always null with new Version 3.14.0
{
tree.ContextMenuStrip = null;
return;
}
if (row.Item is Type1Row)
{
-------------------
tree.ContextMenuStrip = 'XXXXXXXXXXX'
}
else if(row .Item is Type2Row)
{
tree.ContextMenuStrip = 'XXXXXXXXXXXX'
}
}

Thanks a lot
developer YFTOM
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Dec 04, 2009 10:45 pm    Post subject: Reply with quote

Can you email a zipped sample project to support@infralution.com that demonstrates the problem. This makes it much easier for us to diagnose then having to reconstruct a project from code snippets.
_________________
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