Print Page | Close Window

How to get the value of a item to Font

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=2019
Printed Date: 15 May 2024 at 12:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to get the value of a item to Font
Posted By: camus
Subject: How to get the value of a item to Font
Date Posted: 23 March 2005 at 1:59pm

Hi,

On my PropertyGrid I have added a item of type Font, with the following code:

PropertyGridItemFont ItemFont = (PropertyGridItemFont)Category.AddChildItem(PropertyItemType .PropertyItemFont, "FontItem", this.Font.ToHfont().ToInt32());

ItemFont.Color = 0xFF0000;

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:

Font result= (Font)e.item.Value;

 

Can you tell me the correct way to get the value using C#?

 

Best regards,

Camus

 




Replies:
Posted By: jantje
Date Posted: 07 June 2005 at 3:02am

Hi,

I have the same problem.

Do you have the solution?

thanks........

Best regards,

Jantje

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net