Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v2) • Re: How to set the background color for the Picture control

$
0
0

CODE:

#Requires AutoHotkey v2.0
MyGui := Gui(,"Gui测试")
MyGui.Opt("+Resize")
MyGui.BackColor := "ddc4b0"
MyGui.AddEdit("r9 vedtEdit w325 ReadOnly")
picColor0 := MyGui.AddPic("xm w19 h19 vpicColor0 BackgroundGreen")
edtXYColor0 := MyGui.AddEdit("r1 w300 vedtXYColor0 yp ReadOnly")
MyGui.Show("Center")

^r:: {
picColor0.Opt("+BackgroundRed")
picColor0.Redraw() ; static controls aren't redrawn automatically after a color change
}
^g:: {
picColor0.Opt("+BackgroundGreen")
picColor0.Redraw()
}
^b:: {
picColor0.Opt("+BackgroundBlue")
picColor0.Redraw()
}

Statistics: Posted by just me — Today, 16:36



Viewing all articles
Browse latest Browse all 579

Trending Articles