Hi!
I would like to start a fontDialog containing the columns Header Font like
FontData f = DisplayLayout.Bands[0].Columns[0].Header.Appearance.FontData;
( All columns are alike)
I can read the fontdata properties from the column's Header Appearance object. What I am missing is , how can I create a font from fontdata ? I would like to set the font dialog to the fontdata setting.
A special fontdialog using fontdata input would of course also do it. Maybe I missed something in fontdata workings ?
best regards
luke_sky said:What I am missing is , how can I create a font from fontdata ?
Example:string name = string.IsNullOrEmpty(fontData.Name) ? SystemFonts.DefaultFont.Name : fontData.Name;
FontStyle style = FontStyle.Regular;if ( fontData.Bold == DefaultableBoolean.True ) style |= FontStyle.Bold;
if ( fontData.Italic == DefaultableBoolean.True ) style |= FontStyle.Italic;
if ( fontData.Strikeout == DefaultableBoolean.True ) style |= FontStyle.Strikeout;
if ( fontData.Underline == DefaultableBoolean.True ) style |= FontStyle.Underline;
float size = fontData.SizeInPoints > 0f ? fontData.SizeInPoints : SystemFonts.DefaultFont.SizeInPoints;
Font font = new Font( name, size, style );
Thanks, that did the trick!