mutil line txt box [英] mutil line txt box

查看:70
本文介绍了mutil line txt box的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


对于一个VB新手,任何人都可以帮我解决以下这个简单的想法。


所有我都有我的form是一个Textbox,(mulitline = true)和一个按钮。


当我点击按钮时,我会有一些简单的文字行显示

显示。我如何...


Dim addLine As String =" Next Line"

Dim addLine As String =" Another Line"

TextBox1.Text ="第一行

然后下一行显示下一行

和下一个显示另一行

什么是换行符? \ n

解决方案

vbCrLf

blockquote>

如果我写这个..


TextBox1.Text ="第一行vbCrLf

TextBox1.text更多文字


它只是覆盖了顶行,下一行,然后是下一行。


我想把它们分开显示它们

1)Line一个

2)更多文字

3)别的东西


或者我这样做错了吗?


" jvb" <去***** @ gmail.com>在消息中写道

news:11 ********************** @ o13g2000cwo.googlegr oups.com ...

vbCrLf



试试这个...


Me.TextBox1.Text + ="第一行 &安培; vbCrLf

Me.TextBox1.Text + =" Line Two" &安培; vbCrLf


那会给你


第一行

第二行


Hello

For a VB novice can anyone help me with the following simple idea.

All I''ve got on my form is a Textbox, (mulitline = true) and a button.

When I click the button I will have some simple lines of text to be
displayed. How do I have...

Dim addLine As String = "Next Line"
Dim addLine As String = "Another Line"
TextBox1.Text = "Line one"
then the next line display Next Line
and the next display Another Line

What is the newline char? \n

解决方案

vbCrLf


If I write this..

TextBox1.Text = "Line one"vbCrLf
TextBox1.text "more Text"

It just overwrites the top line, with the next line, then the next.

I''m tring to display them on seperate line
1) Line one
2) more Text
3) something else

Or am i doing this wrong?

"jvb" <go*****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...

vbCrLf



Try this...

Me.TextBox1.Text += "Line One" & vbCrLf
Me.TextBox1.Text += "Line Two" & vbCrLf

That will give you

Line One
Line Two


这篇关于mutil line txt box的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆