VB文本框对齐代码

2025-01-31 12:45:51
推荐回答(2个)
回答1:

在对应的单选按钮的click事件中添加如下代码 Text1.Alignment = 0 ‘左对齐 Text1.Alignment = 2 ’居中 Text1.Alignment = 1 ‘右对齐。 至于具体的你自己试一下好点

回答2:

无语啦,楼上天才还写错了…… Private Sub Option1_Click() Text1.Alignment = 0 End Sub Private Sub Option2_Click() Text1.Alignment = 2 End Sub Private Sub Option3_Click() Text1.Alignment = 1 End Sub