由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - 问题又来了.
相关主题
How to cancel DateTimePicker event?Reference type问题
C# smart device questionhow to let button response 'return' key?
CrystalReport 问题C# problems
How to get button name? (转载)datagrid help
control array in .net数据绑定问题
一道mcad考试题求解(有关DataAdapter)自动化的问题 (WebBrowser)
clicks by referenceA VB Question from a beginner
dynamic change before refreshingA Bug about TextBox?
相关话题的讨论汇总
话题: textbox话题: textbox1话题: gettextbox话题: txtbox话题: click
进入DotNet版参与讨论
1 (共1页)
j*****o
发帖数: 320
1
Windows Application with one form. There is a textBox1 and a button
on it.
...
private TextBox getTextBox()
{
TextBox txtBox = new TextBox();
txtBox.Text = DateTime.Now.ToString();
return txtBox;
}
private void button1_Click(object sender, System.EventArgs e)
{
textBox1 = getTextBox();
}
...
Why textBox1.Te
j**y
发帖数: 1
2
Try this,
private void button1_Click(object sender, System.EventArgs e)
{
textBox1.Text = DateTime.Now.ToString();
}
Don't think you can return an object to textBox1

e)
happen?

【在 j*****o 的大作中提到】
: Windows Application with one form. There is a textBox1 and a button
: on it.
: ...
: private TextBox getTextBox()
: {
: TextBox txtBox = new TextBox();
: txtBox.Text = DateTime.Now.ToString();
: return txtBox;
: }
: private void button1_Click(object sender, System.EventArgs e)

s***h
发帖数: 88
3
Try this:
private void button1_Click(object sender, System.EventArgs e)
{
textBox1.Text = getTextBox().Text;
}

e)
happen?

【在 j*****o 的大作中提到】
: Windows Application with one form. There is a textBox1 and a button
: on it.
: ...
: private TextBox getTextBox()
: {
: TextBox txtBox = new TextBox();
: txtBox.Text = DateTime.Now.ToString();
: return txtBox;
: }
: private void button1_Click(object sender, System.EventArgs e)

G**T
发帖数: 388
4

maybe you need:
txtBox.refresh
e)
happen?

【在 j*****o 的大作中提到】
: Windows Application with one form. There is a textBox1 and a button
: on it.
: ...
: private TextBox getTextBox()
: {
: TextBox txtBox = new TextBox();
: txtBox.Text = DateTime.Now.ToString();
: return txtBox;
: }
: private void button1_Click(object sender, System.EventArgs e)

1 (共1页)
进入DotNet版参与讨论
相关主题
A Bug about TextBox?control array in .net
觉得C#的valuetype和boxing真的是没有必要一道mcad考试题求解(有关DataAdapter)
Chaago.comclicks by reference
求教:从条形码扫描器Scanner读数据到VB .NET程序dynamic change before refreshing
How to cancel DateTimePicker event?Reference type问题
C# smart device questionhow to let button response 'return' key?
CrystalReport 问题C# problems
How to get button name? (转载)datagrid help
相关话题的讨论汇总
话题: textbox话题: textbox1话题: gettextbox话题: txtbox话题: click