tagCANDY CGI VBレスキュー(花ちゃん) の Visual Basic 2010 用 掲示板(VB.NET 掲示板)
VBレスキュー(花ちゃん) の Visual Basic 2010 用 掲示板(VB.NET 掲示板)
[ツリー表示へ]  [ワード検索]  [Home]

タイトル Re^4: 同時書式設定
投稿日: 2007/12/08(Sat) 12:03
投稿者マリオ
  Dim fontstyle As FontStyle = Drawing.FontStyle.Regular
      
    '太字の設定
        If ToolStripButton1.CheckState = CheckState.Checked Then
            fontstyle = Drawing.FontStyle.Bold
        End If
    ’イタリック体
        If ToolStripButton2.CheckState = CheckState.Checked Then
            fontstyle = fontstyle Or Drawing.FontStyle.Italic
        End If
    ’下線
        If ToolStripButton3.CheckState = CheckState.Checked Then
            fontstyle = fontstyle Or Drawing.FontStyle.Underline
        End If
    ’取り消し線
        If ToolStripButton14.CheckState = CheckState.Checked Then
            fontstyle = fontstyle Or Drawing.FontStyle.Strikeout
        End If
   
   Me.RichTextBox1.SelectionFont = New Font
(Me.RichTextBox1.SelectionFont.FontFamily,
Me.RichTextBox1.SelectionFont.Size, fontstyle)

      こんな風にツールボタンのチェックステートの状態に応じて
  スタイルを組み合わせられる仕組みにしたらどうでしょう。

- 関連一覧ツリー をクリックするとツリー全体を一括表示します)

古いスレッドにレスはつけられません。