Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron User Interface for .NET
»
NTreeViewEx - Cancel expand/collapse
NTreeViewEx - Cancel expand/collapse
Post Reply
NTreeViewEx - Cancel expand/collapse
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Imanol Yurrebaso
Imanol Yurrebaso
posted 12 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 15,
Visits: 3
Hello,
In my NTreeViewEx, I capture the double click event and perform a certain operation with the text of that node. Additionally, following the behaviour of the NTreeViewEx, the node will collapse or expand depending on the previous state. I would like to avoid that behaviour, but still allowing the user to expand or collapse the nodes by using the +/- symbol.
I managed to capture the collapsing/collapsed/expanding/expanded events with the ItemNotify event, but I cannot find the way of cancelling the action. Any ideas?
PS: as I asked some questions here already and received good replies, I would like to thank the wonderful work of the Nevron Support Team
.
Reply
Like
0
Reply
Nevron Support
Nevron Support
posted 12 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hi Imanol,
Try to handle ItemNotify event as in following example code:
bool m_Clicked;
void nTreeViewEx1_ItemNotify(object sender, NLightUIItemNotifyData data)
{
if (data.NotifyCode == NTreeViewEx.ItemLabelClickNotifyCode)
{
m_Clicked = true;
}
if (data.NotifyCode == NTreeViewEx.NodeExpandingNotifyCode || data.NotifyCode == NTreeViewEx.NodeCollapsingNotifyCode)
{
if (m_Clicked)
{
data.Cancel = true;
m_Clicked = false;
}
}
}
Best Regards,
Nevron Support Team
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
NTreeViewEx - Cancel expand/collapse
Imanol Yurrebaso 1
-
12 Years Ago
Hi Imanol, Try to handle ItemNotify event as in following example...
Nevron Support
-
12 Years Ago
Thanks, I managed to use that in my code .
Imanol Yurrebaso 1
-
12 Years Ago
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search