0

I want to have custom color picker in web part properties to let users select colors for headings. Any idea how to achieve this.

  • Any one has any idea ?? – Rajeev K Jul 9 '14 at 10:31
  • 1
    The controls on web part properties are limited, you can only create simple controls like textbox, dropdowns, checkbox and buttons (I don't know if I miss another one)... So, I think you can make a simple color picker with dropdown controls... let me know if you need assistance on how to create these controls, but I would need to know the SP version and VS version. – agzertuche Jul 15 '14 at 20:53
  • Thanks for reply. What you suggest is to have simple color names in drop-down and then get color from its hex code through script ..right.! But I want to let users select proper color from color picker.! that will be more easy for us to choose colors more precisely. – Rajeev K Jul 17 '14 at 7:17
  • Please let me know if you have any idea for this case. greatly appreciated. I'll let you know my questions if I need in this case if we decide to move along with usual controls like drop-downs and all. thanks a lot.! – Rajeev K Jul 17 '14 at 7:19
0

You can try to replicate a simple color picker with a dropdown control setting the corresponding background color foreach item. This way you can get the following:

enter image description here

Maybe this could be a good solution for your requirement.

Useful information:

How to create a custom web part editor: http://msdn.microsoft.com/en-us/library/office/hh228018(v=office.14).aspx

How to build a Color DropDownList control http://www.codeproject.com/Articles/19356/Multi-color-DropDownList-using-C

  • oh..that's great.it will help me out for sure.I appreciate. thank you very much – Rajeev K Jul 18 '14 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.