当前位置:神舟问>百科知识>请教在textbox控件中如何实现自动换行

请教在textbox控件中如何实现自动换行

2023-06-29 22:33:47 编辑:join 浏览量:602

请教在textbox控件中如何实现自动换行

'窗体放Text1(MultiLine设置为True,ScrollBars 设置为2)和Text2(MultiLine设置为True,ScrollBars 设置为3),一个Command1

Private Sub Form_Load()

Text2.Move Text1.Left, Text1.Top, Text1.Width, Text1.Height

blnNewLine = False

Text1.Visible = False '默认不自动换行(让不自动换行的控件在上面)

End Sub

Private Sub Text1_Change()

Text2.Text = Text1.Text

End Sub

Private Sub Text2_Change()

Text1.Text = Text2.Text

End Sub

Private Sub Command1_Click() '自动换行切换

If Text1.Visible = True Then

Text1.Visible = False

Text2.Visible = True

Else

Text1.Visible = True

Text2.Visible = False

End If

End Sub

标签:控件,textbox,换行

版权声明:文章由 神舟问 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.shenzhouwen.com/article/114266.html
热门文章