<?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 : &#070;ormat not immediate</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : &#070;ormat not immediate]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 24 May 2026 12:48:21 +0000</pubDate>
  <lastBuildDate>Thu, 24 Mar 2005 15:59:58 +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=2028</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[&#070;ormat not immediate : When you change the numeric format...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=2028&amp;PID=5928&amp;title=format-not-immediate#5928</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1069">bluelizard</a><br /><strong>Subject:</strong> 2028<br /><strong>Posted:</strong> 24 March 2005 at 3:59pm<br /><br />When you change the numeric format of PropertyGridItem using Formatfunction, the change is not immediately applied to the number (typeDouble).&nbsp; If you edit the value or set the value after code, thenthe format is applied.&nbsp; Should be applied when Format stringchanges too.<br><br>To duplicate in VB6, place PropertyGrid on Form1 and add the Form_Load code. <br><br><span style="font-family: courier new,courier,mono;">Private Sub Form_Load()<br>&nbsp;&nbsp;&nbsp; Dim pi As Double<br>&nbsp;&nbsp;&nbsp; pi = Atn(1) * 4<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim fmt As String<br>&nbsp;&nbsp;&nbsp; fmt = "%0.9f"<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim pgiCat As PropertyGridItem<br>&nbsp;&nbsp;&nbsp; Set pgiCat = PropertyGrid1.AddCategory("Category")<br>&nbsp;&nbsp;&nbsp; pgiCat.Expanded = True<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim pgiChild As PropertyGridItem<br>&nbsp;&nbsp;&nbsp; Set pgiChild = pgiCat.AddChildItem(PropertyItemDouble, "Child", pi)<br>&nbsp;&nbsp;&nbsp; pgiChild.Format = fmt&nbsp; 'this doesn't display right away<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim pgiNext As PropertyGridItem<br>&nbsp;&nbsp;&nbsp; Set pgiNext = pgiCat.AddChildItem(PropertyItemDouble, "Next", Null)<br>&nbsp;&nbsp;&nbsp; pgiNext.Value = pi<br>&nbsp;&nbsp;&nbsp; pgiNext.Format = fmt 'this doesn't display right either<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim pgiSibling As PropertyGridItem<br>&nbsp;&nbsp;&nbsp; Set pgiSibling = pgiCat.AddChildItem(PropertyItemDouble, "Sibling", 0)<br>&nbsp;&nbsp;&nbsp; pgiSibling.Format = fmt<br>&nbsp;&nbsp;&nbsp; pgiSibling.Value = pi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'this displays correctly.<br>End Sub<br></span><br>]]>
   </description>
   <pubDate>Thu, 24 Mar 2005 15:59:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=2028&amp;PID=5928&amp;title=format-not-immediate#5928</guid>
  </item> 
 </channel>
</rss>