以编程方式添加按钮 [英] Adding buttons programmatically
问题描述
嗨
我有一个表单,我在de form_Load函数中以编程方式添加按钮
任何人都知道如何实现如何实现button_click设计师模式按钮不存在
另一个问题
在数据网格控件中可以通过编程方式自动调整列
另一个
在列表视图中有可能当我选择一个项目时看不到蓝色
感谢
Silvia
Hi
I have a form and I add buttons programmatically in de form_Load function
Anybody know how implements de function button_click if in the designer mode the button doesn''t exists
Another question
In a datagrid control is posible programmatically do autosize columns
Another
In a listview is possible that when I select a item doesn''t view in blue color
Thank
Silvia
推荐答案
" Silvia" <一个******* @ discussions.microsoft.com> écritdansle message de
新闻:D2 ********************************* * @ microsof t.com ...
"Silvia" <an*******@discussions.microsoft.com> a écrit dans le message de
news:D2**********************************@microsof t.com...
我有一个表单,我在de form_Load函数中以编程方式添加按钮。
任何人知道如何实现de function button_click如果在设计器中
Hi,
I have a form and I add buttons programmatically in de form_Load function.
Anybody know how implements de function button_click if in the designer
模式按钮不存在?
在创建按钮的函数内部:
myButton.Click + = new EventHandler(iHabeDetectedAClick);
然后,创建函数:
private void iHabeDetectedAClick(object sender,EventArgs e)
{
System.Console.WriteLine(检测到点击);
}
mode the button doesn''t exists?
Inside the function that create the button :
myButton.Click += new EventHandler(iHabeDetectedAClick);
Then, create the function :
private void iHabeDetectedAClick(object sender, EventArgs e)
{
System.Console.WriteLine(The Click Was Detected);
}
" Silvia" <一个******* @ discussions.microsoft.com> écritdansle message de
新闻:D2 ********************************* * @ microsof t.com ...
"Silvia" <an*******@discussions.microsoft.com> a écrit dans le message de
news:D2**********************************@microsof t.com...
我有一个表单,我在de form_Load函数中以编程方式添加按钮。
任何人知道如何实现de function button_click如果在设计器中
Hi,
I have a form and I add buttons programmatically in de form_Load function.
Anybody know how implements de function button_click if in the designer
模式按钮不存在?
在创建按钮的函数内部:
myButton.Click + = new EventHandler(iHabeDetectedAClick);
然后,创建函数:
private void iHabeDetectedAClick(object sender,EventArgs e)
{
System.Console.WriteLine(检测到点击);
}
mode the button doesn''t exists?
Inside the function that create the button :
myButton.Click += new EventHandler(iHabeDetectedAClick);
Then, create the function :
private void iHabeDetectedAClick(object sender, EventArgs e)
{
System.Console.WriteLine(The Click Was Detected);
}
在Visual Basic中我必须这样做吗?
>
感谢
----- Mathieu Chavoutier写道:----
" Silvia" <一个******* @ discussions.microsoft.com> a ??? crit dans le message d
新闻:D2 ******************************* *** @ microsof t.com ..
In Visual Basic I have to do the same?
Thank
----- Mathieu Chavoutier wrote: ----
"Silvia" <an*******@discussions.microsoft.com> a ??crit dans le message d
news:D2**********************************@microsof t.com..
你好
我有一个表单,我在de form_Load函数中以编程方式添加按钮
任何人都知道如何实现函数button_click如果在设计中
I have a form and I add buttons programmatically in de form_Load function
Anybody know how implements de function button_click if in the designe
模式按钮不存在
在创建按钮的函数内部
myButton.Click + = new EventHandler(iHabeDetectedAClick)
然后,创建函数
private void iHabeDetectedAClick(object发件人,EventArgs e
System.Console.WriteLine(检测到点击)
mode the button doesn''t exists
Inside the function that create the button
myButton.Click += new EventHandler(iHabeDetectedAClick)
Then, create the function
private void iHabeDetectedAClick(object sender, EventArgs e
System.Console.WriteLine(The Click Was Detected)
>
这篇关于以编程方式添加按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!