vf窗体设计表单加按钮,当单机任何一个按钮时,都能使其他两个按钮标题互换,怎么做,求助
1个回答
展开全部
就是说有3个按钮, 单击其中一个, 另外2个按钮的标题互换?
假定三个按钮名称分别为cmd1,cmd2,cmd3
cmd1的click代码:
c=thisform.cmd2.caption
thisform.cmd2.caption=thisform.cmd3.caption
thisform.cmd3.caption=c
cmd2的click代码:
c=thisform.cmd1.caption
thisform.cmd1.caption=thisform.cmd3.caption
thisform.cmd3.caption=c
cmd3的click代码:
c=thisform.cmd1.caption
thisform.cmd1.caption=thisform.cmd2.caption
thisform.cmd2.caption=c
假定三个按钮名称分别为cmd1,cmd2,cmd3
cmd1的click代码:
c=thisform.cmd2.caption
thisform.cmd2.caption=thisform.cmd3.caption
thisform.cmd3.caption=c
cmd2的click代码:
c=thisform.cmd1.caption
thisform.cmd1.caption=thisform.cmd3.caption
thisform.cmd3.caption=c
cmd3的click代码:
c=thisform.cmd1.caption
thisform.cmd1.caption=thisform.cmd2.caption
thisform.cmd2.caption=c
更多追问追答
追问
是每个按钮都输代码,就可以了吗
追答
是啊
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询