<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Support for system colours</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : Support for system colours]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 05:19:50 +0000</pubDate>
  <lastBuildDate>Fri, 04 Jun 2010 11:52:53 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=16707</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Support for system colours : Hi Simon,   So you solved the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58791&amp;title=support-for-system-colours#58791</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 16707<br /><strong>Posted:</strong> 04 June 2010 at 11:52am<br /><br />Hi Simon, <DIV>&nbsp;</DIV><DIV>So you solved the issue yourself&nbsp;!?!?&nbsp;</DIV><DIV>If you want system colors in your application it's a nice option to have. Thanks for sharing this <img src="http://forum.codejock.com/smileys/smiley2.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>And keep up the good work !</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 04 Jun 2010 11:52:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58791&amp;title=support-for-system-colours#58791</guid>
  </item> 
  <item>
   <title><![CDATA[Support for system colours : Very nice! Thanks for this Simon. ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58728&amp;title=support-for-system-colours#58728</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 16707<br /><strong>Posted:</strong> 28 May 2010 at 2:40pm<br /><br />Very nice! Thanks for this Simon.]]>
   </description>
   <pubDate>Fri, 28 May 2010 14:40:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58728&amp;title=support-for-system-colours#58728</guid>
  </item> 
  <item>
   <title><![CDATA[Support for system colours :  Solved   I have managed this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58708&amp;title=support-for-system-colours#58708</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6027">sbclarke</a><br /><strong>Subject:</strong> 16707<br /><strong>Posted:</strong> 28 May 2010 at 3:08am<br /><br /><font size="4">Solved</font> <img src="http://forum.codejock.com/smileys/smiley20.gif" border="0" align="absmiddle"><br><br>I have managed this reasonably cleanly by writing a helper class for the PropertyGrid control. This allows you to create a new colour picker made up of an enumerated list with icons rendered with the system colours (as suggested by Aaron) and an additional in-place button to choose colours using the XtremeSuiteControls CommonDialogue control. It took some effort to work out what all the flags do as I could not find this in the help. The keyboard can be used to type the colour too.&nbsp; In addition it offers three child sliders to allow you to change the RGB values without the CommonDialogue being open.<br><br>I have use very little API code and have rendered the icons using dynamically loaded PictureBoxes and saving the image to the Windows TEMP folder.<br><br>I have uploaded the code and documentation if anyone finds it helpful or interesting. This was built and tested for CodeJock 13.3.1 - See <a href="uploads/20100528_030528_ColourPropsHelp.zip" target="_blank">uploads/20100528_030528_ColourPropsHelp.zip</a><br><br>I may post an update supporting web safe colours and their names if anyone is interested.<br><br>Simon<br><br>Screen Shots:<br><br>&nbsp;<img src="uploads/20100528_025353_Previews.jpg" height="449" width="620" border="0"><br>]]>
   </description>
   <pubDate>Fri, 28 May 2010 03:08:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58708&amp;title=support-for-system-colours#58708</guid>
  </item> 
  <item>
   <title><![CDATA[Support for system colours : Thanks for your reply Aaron,&amp;#034;In...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58514&amp;title=support-for-system-colours#58514</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6027">sbclarke</a><br /><strong>Subject:</strong> 16707<br /><strong>Posted:</strong> 15 May 2010 at 10:20am<br /><br />Thanks for your reply Aaron,<br><br>"<strong>In ValueChanged event value of Item.Value is <em><font color="#0000ff">long</font></em></strong> <strong>(only Item will show RGB)"<br></strong>We are using VB6 where all colours including system colours are represented by a value of type Long. System colours are enumerated as negative numbers eg:&amp;H8000000F&amp; and API calls are available to convert to RGB and back so the property grid could manage this if it didn't ignore system colours.<br><br><strong>"You could use a dropdown button and calculate Item position / size and show your control (see VB sample Propertygrid where MenuItem is used for showing dropdown menu)</strong>"<br>I have tried this and with some success - the problem is we use the scroll bars and I have not found an event that traps the scrolling, so it looks very strange when you scroll, I haven't given up with this yet though although I want avoid using a timer! Other complications are that categories being collapsed will need the control hiding as we want to leave the control visible for the preview colour.<br><br><strong>"There's no&nbsp;property to change the backgroundcolor but you could use an enumerated Item (with a list of System colors) and add Icons as colors (like the combobox in VB IDE) see also propertygrid sample where icons are added in combo.</strong>"<br>This is a great suggestion - I will look into this as I was not aware I could add icons to the enumerated property lists - I might need to render the icons with the colours selected on the host machine though.<br><br>Its a shame CodeJock have chosen not to support system colours with their colour picker <img src="http://forum.codejock.com/smileys/smiley6.gif" border="0" align="absmiddle"><br><br>Thanks again,<br>Simon<br><br><br><br><br><br>]]>
   </description>
   <pubDate>Sat, 15 May 2010 10:20:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58514&amp;title=support-for-system-colours#58514</guid>
  </item> 
  <item>
   <title><![CDATA[Support for system colours : Hi,  Q:We have a separate colour-picker...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58513&amp;title=support-for-system-colours#58513</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 16707<br /><strong>Posted:</strong> 15 May 2010 at 6:33am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Q:We have a separate colour-picker we could use (although would prefer to use the CodeJock in-built style) by calling from pgMyPropertyGrid_InplaceButtonDown(... and setting Cancel to True, but we then cannot retrieve the colour from Value as it appears to translate system colours to RGB.</DIV><DIV>&nbsp;</DIV><DIV><strong>A:&nbsp;In ValueChanged event value of Item.Value is <EM><FONT color=#0000ff>long</FONT></EM></strong> <strong>(only Item will show RGB)</strong></DIV><DIV><strong></strong>&nbsp;</DIV><DIV>Q: Is it possible to add our own small control (ocx) rather than a button into a property grid item? - This would be our preferred solution as we can keep the same look and feel for this control as our previous (but limited) implementation (See below for screen shots).<BR></DIV><DIV><strong>A: You could use a dropdown button and calculate Item position / size and show your control (see VB sample Propertygrid where MenuItem is used for showing dropdown menu)</strong></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Q: Alternatively, I could do this with an enumerated list and addiitional in-place button, but cannot find out how to change the background colour of the inplace button (We want the colour preview feature)<BR><BR><strong>A: There's no&nbsp;property to change the backgroundcolor but you could use an enumerated Item (with a list of System colors) and add Icons as colors (like the combobox in VB IDE) see also propertygrid sample where icons are added in combo.</strong></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Good luck <img src="http://forum.codejock.com/smileys/smiley2.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 15 May 2010 06:33:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58513&amp;title=support-for-system-colours#58513</guid>
  </item> 
  <item>
   <title><![CDATA[Support for system colours : We are migrating our GUI to CodeJock...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58494&amp;title=support-for-system-colours#58494</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6027">sbclarke</a><br /><strong>Subject:</strong> 16707<br /><strong>Posted:</strong> 14 May 2010 at 4:40am<br /><br />We are migrating our GUI to CodeJock controls to benefit from the modern look and feel and great controls such as the PropertyGrid. However, I cannot find a way to change the functionality of the colour picker to include system colours. <br><br>We have a separate colour-picker we could use (although would prefer to use the CodeJock in-built style) by calling from pgMyPropertyGrid_InplaceButtonDown(... and setting Cancel to True, but we then cannot retrieve the colour from Value as it appears to translate system colours to RGB. <br><br>Is it possible to add our own small control (ocx) rather than a button into a property grid item? - This would be our preferred solution as we can keep the same look and feel for this control as our previous (but limited) implementation (See below for screen shots).<br><br>Alternatively, I could do this with an enumerated list and addiitional in-place button, but cannot find out how to change the background colour of the inplace button (We want the colour preview feature)<br><br>Thanks,<br>Simon<br><br>Wish List...<br><img src="uploads/20100514_043509_CustomColour.jpg" height="297" width="542" border="0"><br>]]>
   </description>
   <pubDate>Fri, 14 May 2010 04:40:03 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16707&amp;PID=58494&amp;title=support-for-system-colours#58494</guid>
  </item> 
 </channel>
</rss>