How to create a dontnet button to display one image when pressed once, and another - when pressed second time(for example red and grey)
--btn = dotnetobject "Button"
dotnetcontrol btn "System.Windows.Forms.Button" pos:[667,101] width:15 height:15 border:false
--btn.FlatStyle = btn.FlatStyle.Flat
btn.flatstyle = dotnetobject "System.Windows.Forms.FlatStyle" Flat
btn.Location = dotNetObject "System.Drawing.Point" 1 prevh
i=1
if i==1 then
(
btn.image = (StringToImage record_red)
i=0
)
else
btn.image = (StringToImage record_grey)
just to use that if, or there is a more correct way?
barigazy · 2013-05-20