且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何动态删除按钮

更新时间:2023-12-05 08:51:46

尝试使用此URL ........... 动态添加和删除用户控件 [
Try this url....................Dynamically add and remove user controls[^]


您可以将按钮设置为visible=false
喜欢
hi u can set button as visible=false
like
button1.Visible = false;

,如果您要设置该位置,则可以使用X和Y坐标值放置其他控件.

and if u want set that place any other control using of X and Y coordinate values.


要动态隐藏按钮时.意味着您正在应用任何条件,并且要取消按钮的结果.
您不能删除只是隐藏按钮.在特定事件中,您可以使用id调用按钮,并设置可见的false,例如jasminpatel在回答中所说的.有关更多详细信息,请参见:
http://msdn.microsoft.com/zh-CN/library/microsoft.office.tools.excel.controls.button.visible%28v=vs.80%29.aspx [
when you want to hide the button dynamically. Means is there any condition that you are applying and on the result of that you want to remove the button.
you cant remove just hide the button. on particular event you can call the button using id and set visible false like jasminpatel has said in the answer. for more details go through this :
http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.controls.button.visible%28v=vs.80%29.aspx[^]