Nevron.UI.Winform.Controls.NCommand


Author
Message
Paul Mead
Paul Mead
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)
Group: Forum Members
Posts: 1, Visits: 1
Currently, I have a request from a client so that when a Nevron.UI.Winform.Controls.NCommand is Moused Down that it will scroll the graph below the button. My problem is there is no Event that I can attach to the object created. Are there any suggestions on how to accomplish this? I tried extending the object but I don't have access to the particular UI object, or at least I haven't found the UI object. Help?
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Paul,

You can attach to whole NDockingToolbar.MouseDown event and check which command contains the mouse location:

nDockingToolbar1.MouseDown += new MouseEventHandler(nDockingToolbar1_MouseDown);

...

void nDockingToolbar1_MouseDown(object sender, MouseEventArgs e)
{
   if (e.Button == MouseButtons.Left)
   {
      int nCount = nDockingToolbar1.Commands.Count;
      for (int i = 0; i < nCount; i++)
      {
         NCommand command = nDockingToolbar1.Commands[i];
         if (command.VisualState.Bounds.Contains(e.Location))
         {
            clickedCommand = command;
            return;
         }
      }
   }
}

Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search