Applies to: Nevron User Interface for .NET
How to use the NColorPane to create a color pane at runtime and show it at specific mouse position?
You may use the NPopup component which allows you to host and display any Windows Forms Control in a popup-manner:
[C#]
//initialize the popup
NPopup popup =
new
NPopup();
popup.Size =
new
NSize(250, 250);
//specify that the popup will be aligned with the mouse position
popup.PlacementInfo.Mode = PopupPlacement.MousePosition;
//create a color pane
NColorPane pane =
new
NColorPane();
//host it on the popup
popup.HostedControl = pane;
//display the popup
popup.Display();
[VB.NET]
'initialize the popup
Dim
popup
As
New
NPopup()
popup.Size =
New
NSize(250, 250)
'specify that the popup will be aligned with the mouse position
popup.PlacementInfo.Mode = PopupPlacement.MousePosition
'create a color pane
Dim
pane
As
New
NColorPane()
'host it on the popup
popup.HostedControl = pane
'display the popup
popup.Display()
Article ID: 187, Created On: 4/13/2011, Modified: 8/2/2011