[Mono-list] WinForm TreeView Control

Stifu stifu at free.fr
Sun Jan 17 08:42:38 EST 2010


I don't know whether what you described is a Mono bug or not (did you try
with .NET? If so it's worth filing a bug with a test case), but you could
try doing it this way instead: handle the DoubleClick event of the TreeView
(not of the nodes), and in it, check which node is the selected or hovered
node (if any).
That way, you don't need to attach more than one event.


Rıdvan Tülünay wrote:
> 
> Hi,
> I am using, TreeView Control on my form,
> I wrote doubleclickevent on it,
> problem is on event occurs times,
> in my TreeView element has four node, events occur for four times,
> but I clicked only one node.
> 
> my code,
> 
> foreach (DataRow dRw in ehil_dataset.Tables["sismenu"].Rows)
> {
>                 TreeNode newNode = new TreeNode();
>                 newNode.Text = dRw["UYGISMI"].ToString();
>                 newNode.Tag = dRw["UYGKODU"].ToString();
>                 EhlMenu.NodeMouseDoubleClick += new
> TreeNodeMouseClickEventHandler(EhlMenu_NodeMouseDoubleClick);
> }
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 

-- 
View this message in context: http://old.nabble.com/WinForm-TreeView-Control-tp27198772p27198884.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list