<?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 : .DefaultValue issues</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : .DefaultValue issues]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 12:14:42 +0000</pubDate>
  <lastBuildDate>Wed, 21 Oct 2009 17:16:04 +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=12430</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[.DefaultValue issues : Hello CJ-Team,  I&amp;#039;m really...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=54054&amp;title=defaultvalue-issues#54054</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1941">Josef</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 21 October 2009 at 5:16pm<br /><br />Hello CJ-Team,<br /><br />I'm really impressed that you were not able to change the type of .DefaultValue from String to Variant within the last year <img src="http://forum.codejock.com/smileys/smiley7.gif" border="0" align="middle">.<br /><br />You did this change on ListBox/ComboBox .ItemData method in 13.2, why not on PropertyGrid.DefaultValue??<br /><br />Bye, Josef<br />]]>
   </description>
   <pubDate>Wed, 21 Oct 2009 17:16:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=54054&amp;title=defaultvalue-issues#54054</guid>
  </item> 
  <item>
   <title><![CDATA[.DefaultValue issues : I third this request. I&amp;#039;m...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=49291&amp;title=defaultvalue-issues#49291</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5236">sforces</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 23 May 2009 at 2:21am<br /><br />I third this request. <img src="http://forum.codejock.com/smileys/smiley4.gif" border="0" align="absmiddle"><br><br>I'm converting to CJ PropertyList from another PropertyList and am finding this would RRRREEEALLLY make things a whole lot simpler as Araron and Josef have already pointed out. <br><br>It's been 5 months since your last response. Can you please update on when this will be included?<br><br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron" alt="Originally posted by Aaron" style="vertical-align: text-bottom;" /> <strong>Aaron wrote:</strong><br /><br />Hi Oleg,<div>&nbsp;</div><div>Is this option&nbsp;removed from&nbsp;TODO list and added to Beta release? <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0"></div><div>I really hope so because I'm really desperate...</div><div>&nbsp;</div><div>Thanks a lot in advance</div><div>&nbsp;</div></td></tr></table>]]>
   </description>
   <pubDate>Sat, 23 May 2009 02:21:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=49291&amp;title=defaultvalue-issues#49291</guid>
  </item> 
  <item>
   <title><![CDATA[.DefaultValue issues : Hi Oleg,  Is this optionremoved...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=49154&amp;title=defaultvalue-issues#49154</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 19 May 2009 at 2:51pm<br /><br />Hi Oleg,<DIV>&nbsp;</DIV><DIV>Is this option&nbsp;removed from&nbsp;TODO list and added to Beta release? <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0"></DIV><DIV>I really hope so because I'm really desperate...</DIV><DIV>&nbsp;</DIV><DIV>Thanks a lot in advance</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 19 May 2009 14:51:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=49154&amp;title=defaultvalue-issues#49154</guid>
  </item> 
  <item>
   <title><![CDATA[.DefaultValue issues : Added to my TODO list. :) ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=43976&amp;title=defaultvalue-issues#43976</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 29 December 2008 at 3:31am<br /><br />Added to my TODO list. :)]]>
   </description>
   <pubDate>Mon, 29 Dec 2008 03:31:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=43976&amp;title=defaultvalue-issues#43976</guid>
  </item> 
  <item>
   <title><![CDATA[.DefaultValue issues :   Aaron wrote:Hi,   CJ could...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=43953&amp;title=defaultvalue-issues#43953</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 28 December 2008 at 5:25am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron" alt="Originally posted by Aaron" style="vertical-align: text-bottom;" /> <strong>Aaron wrote:</strong><br /><br />Hi, <DIV>&nbsp;</DIV><DIV>CJ could make <strong>HighlightChangedItem</strong>&nbsp;public and we could use this&nbsp;to check if the value has been changed <img src="http://forum.codejock.com/smileys/smiley4.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>Thanks in advance</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV></td></tr></table> <DIV>&nbsp;</DIV><DIV>Oleg??? Could this be possible in next releases?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 28 Dec 2008 05:25:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=43953&amp;title=defaultvalue-issues#43953</guid>
  </item> 
  <item>
   <title><![CDATA[.DefaultValue issues : Hi,  CJ could make HighlightChangedItempublic...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=43108&amp;title=defaultvalue-issues#43108</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 22 November 2008 at 5:04am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>CJ could make <strong>HighlightChangedItem</strong>&nbsp;public and we could use this&nbsp;to check if the value has been changed <img src="http://forum.codejock.com/smileys/smiley4.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>Thanks in advance</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sat, 22 Nov 2008 05:04:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=43108&amp;title=defaultvalue-issues#43108</guid>
  </item> 
  <item>
   <title><![CDATA[.DefaultValue issues : Hi,  If CJ would add ValueChanged...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=42353&amp;title=defaultvalue-issues#42353</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 26 October 2008 at 1:52pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>If CJ would add ValueChanged property for&nbsp;PropertyGridItem&nbsp;and Item.Value would be changed (new) ValueChanged property flag would be true and we don't have to compare the values anymore. I think this would be&nbsp;better than changing return values (think about previous versions in which other users have build their "workarounds" to get this working like you now <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0">&nbsp;)&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 26 Oct 2008 13:52:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=42353&amp;title=defaultvalue-issues#42353</guid>
  </item> 
  <item>
   <title><![CDATA[.DefaultValue issues : Aaron,  Thank you for testing....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=42352&amp;title=defaultvalue-issues#42352</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1941">Josef</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 26 October 2008 at 11:57am<br /><br />Aaron,<br /><br />Thank you for testing. A new event would help a little, but does not solve the whole problem:<br /><br />In the Save-code of an option dialog, you will have the same problem: To know which item was changed by enumerating all items.<br /><br />But again, you can't do this without writing code for each itemtype. A property .ValueChanged would help, but the best solution would be if .Defaultvalue and .Value containts the same variable type (Variant) and .Defaultvalue contains the value added by .AddChildItem and nothing else.<br /><br />Currently I'm using the .Tag (=variant type) property to store the Defaultvalue and compare .Tag with .Value to see if the item was changed. But in fact, this would not be necessary if DefaultValue would work as described in helpfile.<br /><br />Thank you,<br />Josef<br />]]>
   </description>
   <pubDate>Sun, 26 Oct 2008 11:57:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=42352&amp;title=defaultvalue-issues#42352</guid>
  </item> 
  <item>
   <title><![CDATA[.DefaultValue issues : Hi,   OK, now I know what you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=42348&amp;title=defaultvalue-issues#42348</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 26 October 2008 at 4:42am<br /><br />Hi, <DIV>&nbsp;</DIV><DIV>OK, now I know what you mean. Return values of items in ValueChanged event&nbsp;always return string and not the type as assigned to it. I tested your issue with PropertyItemString and it worked, but after&nbsp;testing with different types I have to say this doesn't work at all.&nbsp;Most types will work when comparing the Item.Value with Item.DefaultValue, but most isn't good enough <img src="https://forum.codejock.com/smileys/smiley2.gif" border="0"></DIV><DIV>&nbsp;</DIV><OL><LI>Enum: returns value selected index of constraint instead of caption <LI>Bool: returns value True,False instead of "True","False" <LI>Color: returns a right value but only when assigning the DefaultValue yourself you can compare both values. <LI>Font: Fontname is working but changing size or other properties isn't</LI></OL><P>Note: I didn't test PropertyItemOption and PropertyItemEnumFlags </P><DIV>Conlusion: You have to put a lot of effort into it to compare Value and DefaultValue to make it right. </DIV><DIV>&nbsp;</DIV><DIV><strong>My advice would be adding a property ValueChanged (Read/Write) for propertygrid items, in this case we would only have to check this property and not a lot of coding just to compare both values. There's a property HighlightChangedItems&nbsp;so&nbsp;PropertyGrid&nbsp;control already knows the Item.Value has been changed. So it wouldn't be hard to&nbsp;implement this feature </strong><img src="https://forum.codejock.com/smileys/smiley2.gif" border="0">&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Thanks a lot</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 26 Oct 2008 04:42:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=42348&amp;title=defaultvalue-issues#42348</guid>
  </item> 
  <item>
   <title><![CDATA[.DefaultValue issues : Hello Aaron,  Of course it is...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=42343&amp;title=defaultvalue-issues#42343</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1941">Josef</a><br /><strong>Subject:</strong> 12430<br /><strong>Posted:</strong> 24 October 2008 at 6:21pm<br /><br />Hello Aaron,<br /><br />Of course it is strange, if my code does not work <img src="http://forum.codejock.com/smileys/smiley2.gif" border="0" align="middle">!<br /><br />My code would work, if this description of Defaultvalue in SymbolReference.chm would be true:<br /><br />"The DefaultValue is the value provided when the item was added with the AddChildItem method."<br /><br />This is not true, because the value added with AddChildItem is a variant datatype, but Defaultvalue is string.<br /><br />BTW: Your code snippet would have the same problem as my sample code <img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" align="middle"><br />To make it work, you have to convert .Defaultvalue to Variant:<br /><table width="99%"><tr><td><pre class="BBcode">cmdSave.Enabled = (Item.Value &lt;&gt; CBool(Item.DefaultValue))</pre></td></tr></table>But this is only valid, if Item.Type = PropertyItemBool.<br />So you have to write different code for each ItemType, instead of just using<br /><table width="99%"><tr><td><pre class="BBcode">If .DefaultValue &lt;&gt; .Value Then</pre></td></tr></table> for all items.<br /><br />Please try this real life sample (I think it addresses the same problem):<br /><table width="99%"><tr><td><pre class="BBcode">With .AddChildItem(PropertyItemEnum, "Default Addresslist", 5)<br />&nbsp;&nbsp;&nbsp;&nbsp;.Constraints.Add "AddressBook1", 0<br />&nbsp;&nbsp;&nbsp;&nbsp;.Constraints.Add "  All Users", 5<br />&nbsp;&nbsp;&nbsp;&nbsp;.Constraints.Add "  Public Folders", 10<br />&nbsp;&nbsp;&nbsp;&nbsp;.Constraints.Add "AddressBook2", 15<br />&nbsp;&nbsp;&nbsp;&nbsp;.Constraints.Add "  All Users", 20<br />&nbsp;&nbsp;&nbsp;&nbsp;.Constraints.Add "  Public Folders", 25<br />&nbsp;&nbsp;&nbsp;&nbsp;.Constraints.Add "AddressBook3", 30<br />&nbsp;&nbsp;&nbsp;&nbsp;.Constraints.Add "  All Users", 35<br />&nbsp;&nbsp;&nbsp;&nbsp;.Constraints.Add "  Public Folders", 40<br />End With</pre></td></tr></table><br />1. Although the value added with AddChildItem is 5, the preselected Combobox-Item is the third "  All Users" item (35).<br /><br />2. How would you set cmdSave.Enabled in ValueChanged event, if user selects another "  All Users" item? Defaultvalue contains string "  All Users" instead of variant 5.<br /><br />Please think about this issue again, hope I can change your mind.<br /><br />Thank you,<br />Josef<br /><br />]]>
   </description>
   <pubDate>Fri, 24 Oct 2008 18:21:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12430&amp;PID=42343&amp;title=defaultvalue-issues#42343</guid>
  </item> 
 </channel>
</rss>