VB中的TextBox空间默认为填充 [英] TextBox Space in VB By Default as padding

查看:50
本文介绍了VB中的TextBox空间默认为填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是VB的新手


由于我的客户希望文本框中的间距为1,如果他按Backspace,它应该将光标保持在该位置,即留下一个位置...... 。

请帮帮我....



谢谢&问候

Mahesh

解决方案


我是VB新手


由于我的客户希望文本框中的间距为1,如果按Backspace,它应该将光标保持在该位置,即保留一个位置....

请帮帮我.. ..



你能否试着重新说出这个问题?这太难理解了。 (或者也许只是我。)



你能否试着重新说出这个问题?这太难理解了。 (或许它只是我。)



感谢您的快速回复



我的问题是当我的数据来自文本框中的数据库时


对于ex。

我填写了dsn并在Textbox上显示了数据(txtaccno.Text)


....................................... ........... ...............

Dim adaname As New SqlDataAdapter(选择AccountNo from_ customers where custid =' '" + cutidtext +"''",nwindconn)

Dim dsn作为新数据集

adaname.Fill(dsn)


txtaccno.Text =" " + dsn.Tables(0).Rows(0)(" AccountNo")。ToString()

.................... .............................. ..............

i不知道这是显示空间的正确方法吗?


然后,如果用户想要清除他/她将清除数据,即按空格键清除数据或清除那么

但我在文本框中使用了空格,删除了空格,用户可以从文本框上的第零个位置开始



所以我的问题就像是


1.是否正确显示VB中的间距或其他选项如填充....请建议


2.如果用户清除文本框中的数据即AccountNo。光标到Zeorth Position ...有没有任何选项,光标显示在默认情况下从第一或第二位开始每个文本框我有


谢谢&问候

Mahesh


我想一个选项就是在文本框的Change事件中有一些代码,这些代码类似于

展开 < span class =codeDivider> | 选择 | Wrap | Line编号

I am New to VB

As my Client want Spacing in the Textbox by 1 and if he press Backspace it should Keep the Cursor to that position i.e leaving one position....
Please help me....


Thanks & Regards
Mahesh

解决方案

I am New to VB

As my Client want Spacing in the Textbox by 1 and if he press Backspace it should Keep the Cursor to that position i.e leaving one position....
Please help me....

Could you please try to re-phrase the question? It''s just too hard to understand. (Or perhaps it''s just me.)


Could you please try to re-phrase the question? It''s just too hard to understand. (Or perhaps it''s just me.)

Thanks for Quick Response


My question is when my data comes from database in the Textbox

For ex.
I had fill the dsn and showed the data on the Textbox(txtaccno.Text)

.................................................. ...............
Dim adaname As New SqlDataAdapter("select AccountNo from_ customers where custid = ''" + cutidtext + "''", nwindconn)
Dim dsn As New DataSet
adaname.Fill(dsn)

txtaccno.Text = " " + dsn.Tables(0).Rows(0)("AccountNo").ToString()
.................................................. ..............
i dont know is it proper way to show space?

Then if user wants to clear he/she will clear data i.e accountno by backspace or clear then

But i had used Space in the Textbox that spaces is removed and user can start from zeroth position on the Textbox


So my question is like

1. Is it Proper Way to Show spacing in VB or another option like padding....please suggest

2. If user Clears the Data from the Textbox i.e AccountNo. cursor comes to Zeorth Position ...is there any option that cursor showed start at the First or Second Position by default for each Textboxes i have

Thanks & Regards
Mahesh


I suppose one option would be to have some code in the Change event for the textbox, which says something like

Expand|Select|Wrap|Line Numbers


这篇关于VB中的TextBox空间默认为填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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