We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using FontComboBox in PropertyGrid

Thread ID:





17742 Aug 16,2004 02:28 AM UTC Aug 17,2004 08:25 PM UTC WinForms 3
Tags: Tools
Francois R. Renaud
Asked On August 16, 2004 02:28 AM UTC

I am trying to replace the FontStyle Family property to display a list of Fonts using the FontComboBox instead of the standard string box. Can somebody help as I am always getting one item (none) in my drop-down list and a list of all FontComboBox properties as sub-properties?

Administrator [Syncfusion]
Replied On August 16, 2004 07:42 PM UTC

Hi Francois, Please follow the code below to achieve this : this.propgrid.SelectedObject = new FontComboBoxInPropertyGrid(); public class FontComboBoxInPropertyGrid { bool _cb; [Editor(typeof(FontComboBoxInPropertyGridEditor),typeof(System.Drawing.Design.UITypeEditor))] public bool Cb { get{return _cb;} set{_cb=value;} } } public class FontComboBoxInPropertyGridEditor : UITypeEditor { public override bool GetPaintValueSupported(ITypeDescriptorContext context) { return true; } public override void PaintValue(PaintValueEventArgs e) { // Have your custom method here to draw the FontComboBox } } Please let me know if you need further assiatance. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Francois R. Renaud
Replied On August 17, 2004 12:26 AM UTC

Thank you for the advice. I was trying to draw the FontListBox directly in UIEditor EditValue instead of using the method DropDownControl: FontListBox flb = new FontListBox(); edSvc.DropDownControl(flb);

Administrator [Syncfusion]
Replied On August 17, 2004 08:25 PM UTC

Hi Francois, Thanks for the update. I would appreciate if you could create a Direct-Trac incident in this regard, and provide us with the following information : 1. A test sample that shows your implementation of this. 2. Does this "FontStyle Family property" that you are referring to belong to a custom control that you have created ? Regards, Guru Patwal Syncfusion, Inc.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon