我在菜单中写了几个JRadioButtonMenuItem,放在一个ButtonGroup中
鼠标点击后能选中某一个,但是能不能通过其他方式选中,例如,点击某一个按钮之后,某个JRadioButtonMenuItem处于选中状态,谢谢...
鼠标点击后能选中某一个,但是能不能通过其他方式选中,例如,点击某一个按钮之后,某个JRadioButtonMenuItem处于选中状态,谢谢
展开
2个回答
展开全部
可以呀,通过ID
CMenu::CheckMenuItem(ID,true)
CMenu::CheckMenuItem(ID,true)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的语句还没有完善吧。
追问
还没写完
追答
用if else写,
Private Sub 复制ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 复制ToolStripMenuItem.Click
RichTextBox2.Text = RichTextBox1.SelectedText
End Sub
Private Sub 剪切ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 剪切ToolStripMenuItem.Click
RichTextBox2.Text = RichTextBox1.SelectedText
RichTextBox1.SelectedText = ""
End Sub
Private Sub 粘贴ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 粘贴ToolStripMenuItem.Click
RichTextBox1.Text = RichTextBox1.Text & RichTextBox2.Text
End Sub
Private Sub 字体设置ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 字体设置ToolStripMenuItem.Click
If FontDialog1.ShowDialog = DialogResult.OK Then
RichTextBox1.SelectionFont = FontDialog1.Font
End If
End Sub
Private Sub 字体颜色ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 字体颜色ToolStripMenuItem.Click
If ColorDialog1.ShowDialog = DialogResult.OK Then
RichTextBox1.SelectionColor = ColorDialog1.Color
End If
End Sub
Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
这是一个简单windows窗口功能的实现。你看下或许对你有帮助。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询