配置変更(中央、左寄せ、右寄せ)

TextAlignプロパティに配置の列挙体を設定します。
テキストボックスの中のテキストの
横方向の配置が変更されます。

// 中央
textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;

// 左寄せ
textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;

// 右寄せ
textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)