作成日: 2013/08/12 最終更新日: 2013/08/12
文書種別
制限事項
詳細
FlexGridのUseCompatibleTextRenderingプロパティをTrueに設定すると、描画はGDI+で行われます。また、編集中のエディタはGDIで描画されます。そのため、編集中と非編集時で文字間隔(描画)が若干異なります。
回避方法
UseCompatibleTextRenderingプロパティをFalseに設定してグリッドをGDIで描画することで対応してください。
編集時のマージンが小さい場合は、EditorスタイルのMerginsプロパティを設定します。
◆サンプルコード(VB)
◆サンプルコード(C#)
編集時のマージンが小さい場合は、EditorスタイルのMerginsプロパティを設定します。
◆サンプルコード(VB)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
flex.Font = New Font("MS Pゴシック", 11)
' GDIで描画します
flex.UseCompatibleTextRendering = False
' 編集時のマージンを設定
flex.Styles.Editor.Margins = New System.Drawing.Printing.Margins(3, 1, 2, 1)
End Sub
flex.Font = New Font("MS Pゴシック", 11)
' GDIで描画します
flex.UseCompatibleTextRendering = False
' 編集時のマージンを設定
flex.Styles.Editor.Margins = New System.Drawing.Printing.Margins(3, 1, 2, 1)
End Sub
◆サンプルコード(C#)
private void Form1_Load(object sender, EventArgs e)
{
flex.Font = new Font("MS Pゴシック", 11);
// GDIで描画します
flex.UseCompatibleTextRendering = false;
// 編集時のマージンを設定
flex.Styles.Editor.Margins = new System.Drawing.Printing.Margins(3, 1, 2, 1);
}
{
flex.Font = new Font("MS Pゴシック", 11);
// GDIで描画します
flex.UseCompatibleTextRendering = false;
// 編集時のマージンを設定
flex.Styles.Editor.Margins = new System.Drawing.Printing.Margins(3, 1, 2, 1);
}
旧文書番号
80374