<?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 : How to get the value item to font....</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : How to get the value item to font....]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 09:12:39 +0000</pubDate>
  <lastBuildDate>Thu, 18 May 2006 09:30:41 +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=4235</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[How to get the value item to font.... : e.item.Value is ActiveX STDFont...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4235&amp;PID=13011&amp;title=how-to-get-the-value-item-to-font#13011</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4235<br /><strong>Posted:</strong> 18 May 2006 at 9:30am<br /><br /><P>e.item.Value is ActiveX STDFont object - you can't change it's type to managed Font.</P><P>Here code you can try:</P><FONT size=2><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (e.item.Type == PropertyItemType.PropertyItemFont)</P><P>{ </P><P>&nbsp;&nbsp; PropertyGridItemFont FontItem = e.item </FONT><FONT color=#0000ff size=2>as</FONT><FONT size=2> PropertyGridItemFont;</P><P>&nbsp;&nbsp; Font fnt = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> Font(FontItem.FontFaceName, FontItem.FontSize);</P><P>&nbsp;&nbsp; chkCustomColors.Font = fnt;</P><P>}</P></FONT><P>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 18 May 2006 09:30:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4235&amp;PID=13011&amp;title=how-to-get-the-value-item-to-font#13011</guid>
  </item> 
  <item>
   <title><![CDATA[How to get the value item to font.... : Hi, On my PropertyGrid I have...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4235&amp;PID=12990&amp;title=how-to-get-the-value-item-to-font#12990</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2021">wizzy</a><br /><strong>Subject:</strong> 4235<br /><strong>Posted:</strong> 17 May 2006 at 9:03pm<br /><br /><P>Hi,</P><P>On my PropertyGrid I have added a item of type font&nbsp;, with the following code:</P><FONT size=2><P>PropertyGridItemFont ItemFont = (PropertyGridItemFont)Category.AddChildItem(PropertyItemType .PropertyItemFont "FontItem", </FONT><FONT color=#0000ff size=2>this.Font</FONT><FONT size=2>.ToHfont().ToInt32());</P><P>ItemFont.Color = 0xFF0000;</P><P>But at time to retrieve the value with the event ValueChanged, It will generate an exception. The code that I am using to get the value is as follow:</P><P>Font <FONT size=2>result= (Font)e.item.Value;</FONT></P><P><FONT size=2></FONT>&nbsp;</P><P><FONT size=2>Can you tell me the correct way to get the value using C#?</FONT></P></FONT>]]>
   </description>
   <pubDate>Wed, 17 May 2006 21:03:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4235&amp;PID=12990&amp;title=how-to-get-the-value-item-to-font#12990</guid>
  </item> 
 </channel>
</rss>