Sign in to follow this  
TechnoRobbo

Hex Color Wheel

Recommended Posts

This topic is in response to this post

http://forums.getpaint.net/index.php?/topic/30462-feature-request-hex-color-input-available-in-plugins-color-wheel/?p=420010

 

I've been using a custom Color Wheel on Visual Studio. When I read the post I saw there was a need to modify it to include Hex input.

 

I asked Ego Eram Reputo,Red Ochre and Midora to have a look at it before posting and they had excellent suggestions which were incorporated into the control. Thank you all for taking time to look.

 

ColorWheel.PNG?raw=1

 

Here is the control source to be incorporated in  a project

 

Namespace is Controlz:

Using Controlz;

 

The control has one event :

private void colorWheelTR1_ValueChanged(object sender, Color e)

 

One Read/Write property:

colorval

 

Three Read only properties:

hue,val,sat for HSV reference

 

 

The Control :ColorWheelTRControl.zip

 

Make sure to build the control after you import the source into your project. It will then appear inthe Toolbox

  • Upvote 2

Share this post


Link to post
Share on other sites

It's a very nice control TR.  Thank you for publishing it and for allowing me to make some suggestions.

 

Usage:

  • Download the zipped file in the post above. 
  • The zip contains three files: ColorWheelTR.cs, ColorWheelTR.designer.cs and ColorWheelTR.resx.  Unzip them to a location you can find again.
  • Open or create a new Visual Studio plugin project.  If new, save it under it's own folder (good housekeeping!)
  • Copy the three unzipped files to your project folder.
  • In the VS Solution Explorer, right click the project name and select Add Existing Item from the context sensitive menu.
  • Navigate to the ColorWheelTR.cs file and double click it to add it to the project.
  • Press F6 to build the control.
  • In your projects design view (the UI view), open the Toolbox.  You'll find  ColorWheelTR at the top of the Toolbox.

yhsjjie-2121.png

  • Drag the control to your UI just like any regular control.
  • Click the control to highlight it.
  • At the top of the Properties window find and click the icon that looks like a lightning bolt (the Events tab)
  • Find the field ValueChanged.  Double click in the empty space beside the field to create an event handler which fires when the control is changed. The appropriate code stub will also be created.  This is where your code should grab and use the new color value.
  • Upvote 2

Share this post


Link to post
Share on other sites

Thanks for the control TR!

Many E.E.R for the very useful guide on how to use it -  I'm bookmarking this page! ;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this