如何在文本框中显示只读值? [英] How to show readonly values in textbox?

查看:129
本文介绍了如何在文本框中显示只读值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4个文本框.我要在其上显示只读值.在按钮单击事件之后,我必须再次显示更新的值.还有其他一些事情要做.需要从数据库中检索数据并将其显示在特定的文本框中.谁能给我解决方案?

I have 4 textboxes. On which I want to show values which are readonly. After a button click event I have to show the updated values again.There''s some other things to do. need to retrieve data from the database and show it to specific textboxes. Can anyone give me a solution?

推荐答案

它非常简单的Sazib.
只需将文本框的只读属性设置为True.
否则将Enabled属性设置为False.
但是将enable设置为false会使文本框的外观变暗.
因此最好使用ReadOnly属性.
Its very simple Sazib.
Just set the ReadOnly proeprty of textbox to True.
Or otherwise set Enabled property to False.
But setting enable false makes appearance of textbox dull.
So better to use ReadOnly property.


这非常简单.
将文本框"控件的"ReadOnly"属性设置为True.
要查看数据后点击按钮,请点击

首先清除所有文本框.
接下来编写选择查询,并在适当的文本框上调用它
好的
Its very simple.
Make the "ReadOnly" property of Textbox control to True.
For viewing the data atfer a button click

First Cleare all textboxes.
Next write the select query and call it on appropriate textboxes
ok




右键单击按钮"控件,将显示属性窗口.
您将在其中找到ReadOnly属性.
然后将其设置为"False".
就是这样.
Hi,

Right click on Button control,then you will get property window.
There you will find the ReadOnly Property.
Then make it as "False".
Thats it.


这篇关于如何在文本框中显示只读值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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