Der_Andi Posted January 4, 2010 Share Posted January 4, 2010 Hi,I just discovered something strange. Don't know, if it's a bug or just me missing a piece.When I update a picture control (GUICtrlCreatePic with $SS_SUNKEN style) with the same or a different picture over and over again, the picture control gets bigger! Without $SS_SUNKEN, it doesn't. Why is that?Here's a example to demonstrate it.Put a jpg file named 'pic.jpg' in @ScriptDir or use the attached one. *#NoTrayIcon #include <GuiConstants.au3> #include <StaticConstants.au3> Opt("GuiOnEventMode", 1) GUICreate("Pic test?", 800, 360) GUISetOnEvent($gui_event_close, "quit") GUICtrlCreateLabel("NOT sunken", 10, 4, 380, 16, $ss_center) GUICtrlCreateLabel("Sunken!", 410, 4, 380, 16, $ss_center) $pic1 = GUICtrlCreatePic("", 10, 20, 380, 285) $pic2 = GUICtrlCreatePic("", 410, 20, 380, 285, $ss_sunken) $btn = GUICtrlCreateButton("Refresh picture", 10, 320, 185, 30) GUICtrlSetOnEvent($btn, "showPic") GUISetState() While True Sleep(1000) WEnd Func showPic() GUICtrlSetImage($pic1, "pic.jpg") GUICtrlSetImage($pic2, "pic.jpg") EndFunc Func quit() Exit EndFunc---* Sorry, if I made you hungry, I just had this one nearby. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now