Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Refreshing pictures makes sunken control bigger?


  • Please log in to reply
No replies to this topic

#1 Der_Andi

Der_Andi

    Wayfarer

  • Active Members
  • Pip
  • 84 posts

Posted 04 January 2010 - 12:27 AM

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. *

AutoIt         
#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. :evil:

Attached Thumbnails

  • pic.jpg











0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users