Profile Picture

Nevron.UI.Winform.Controls.NCommand

Posted By Paul Mead 12 Years Ago
Author
Message
Paul Mead
Posted 12 Years Ago
View Quick Profile
Forum Newbie

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
Last Active: 12 Years Ago
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
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
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





Similar Topics


Reading This Topic