作成日: 2013/09/17 最終更新日: 2013/09/30
文書種別
不具合
状況
修正済み
詳細
C1Report デザイナで、カスタムフィールドの「均等割り付けテキスト」を追加し、Textプロパティに、スペースで終わる文字列(例:"AAA ")を設定します。すると、スペースを含めた均等割り付けが行われず、「AAA」が左側に偏って表示されます。
回避方法
この問題はバージョン4.6.20132.54640で修正されました。
修正版を適用しない場合は、次の手順で回避することができます。
1. 製品に収録されているCustomFieldsサンプル(※)のJustifyText.csで、GetCharacterWidth関数の以下の行を修正します。
(修正前)
Region[] region = g.MeasureCharacterRanges(str, this.Font, new Rectangle(0, 0, int.MaxValue, int.MaxValue), _fmt);
(修正後)
SizeF size = g.MeasureString(str.Replace(' ', 'M').Replace(' ', 'M'), this.Font);
Region[] region = g.MeasureCharacterRanges(str.Replace(' ', 'M').Replace(' ', 'M'), this.Font, new RectangleF(0, 0, size.Width, size.Height), _fmt);
※ C:¥Users¥ユーザー名¥Documents¥ComponentOne Samples¥Studio for WPF¥C1.WPF.C1Report¥C1WPFReport¥CS¥CustomFields に収録されています。
2. プロジェクトをビルドし、生成されたC1.WPF.C1Report.CustomFields.4.dllを、以下のフォルダに上書きコピーします。
C:¥Program Files¥ComponentOne¥C1Reports¥v4¥
修正版を適用しない場合は、次の手順で回避することができます。
1. 製品に収録されているCustomFieldsサンプル(※)のJustifyText.csで、GetCharacterWidth関数の以下の行を修正します。
(修正前)
Region[] region = g.MeasureCharacterRanges(str, this.Font, new Rectangle(0, 0, int.MaxValue, int.MaxValue), _fmt);
(修正後)
SizeF size = g.MeasureString(str.Replace(' ', 'M').Replace(' ', 'M'), this.Font);
Region[] region = g.MeasureCharacterRanges(str.Replace(' ', 'M').Replace(' ', 'M'), this.Font, new RectangleF(0, 0, size.Width, size.Height), _fmt);
※ C:¥Users¥ユーザー名¥Documents¥ComponentOne Samples¥Studio for WPF¥C1.WPF.C1Report¥C1WPFReport¥CS¥CustomFields に収録されています。
2. プロジェクトをビルドし、生成されたC1.WPF.C1Report.CustomFields.4.dllを、以下のフォルダに上書きコピーします。
C:¥Program Files¥ComponentOne¥C1Reports¥v4¥
旧文書番号
80466