作成日: 2013/09/09 最終更新日: 2013/10/01
文書種別
不具合
状況
修正済み
詳細
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);
2. プロジェクトをビルドし、生成されたC1.C1Report.CustomFields.2.dll(またはC1.C1Report.CustomFields.4.dll)を、以下のフォルダに上書きコピーします。
C:¥Program Files¥ComponentOne¥C1Reports¥v2¥C1.C1Report.CustomFields.2.dll
C:¥Program Files¥ComponentOne¥C1Reports¥v4¥C1.C1Report.CustomFields.4.dll
修正版を適用しない場合の回避方法は以下のとおりです。
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);
2. プロジェクトをビルドし、生成されたC1.C1Report.CustomFields.2.dll(またはC1.C1Report.CustomFields.4.dll)を、以下のフォルダに上書きコピーします。
C:¥Program Files¥ComponentOne¥C1Reports¥v2¥C1.C1Report.CustomFields.2.dll
C:¥Program Files¥ComponentOne¥C1Reports¥v4¥C1.C1Report.CustomFields.4.dll
旧文書番号
80454