string to Font [modified]
-
PropertyInfo propertys = control.GetType().GetProperty("Font");
tc = System.ComponentModel.TypeDescriptor.GetConverter(propertys.PropertyType);propertys.SetValue(control, (
?
)"Arial", null);modified on Tuesday, February 9, 2010 2:10 AM
-
PropertyInfo propertys = control.GetType().GetProperty("Font");
tc = System.ComponentModel.TypeDescriptor.GetConverter(propertys.PropertyType);propertys.SetValue(control, (
?
)"Arial", null);modified on Tuesday, February 9, 2010 2:10 AM
Hi, to create a font-object from the font-name you need the constructor of the font-class. Take a look here: http://msdn.microsoft.com/en-us/library/system.drawing.font.aspx[^] Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.