Jump to content
Sign in to follow this  

question about Graphic controls

Recommended Posts

So... Why does a refresh command to control 2 also make control 1 refresh?

To battle the flickering in my AutoIt Analog/Digital Alarm Clock that I wrote this weekend and posted on the examples forum, I wrote my code to use multiple separately spaced Graphic controls. This so I could separately refresh the second dial or the digital time indication LED's that I built, so in turn only the changed Graphic control would flicker. Since it would flicker only when it changes, it would be acceptible als also less discernible.

But, after some work, it turned out that it didn't make a difference. So I wrote a small reproducer that creates two separate Graphic controls on a GUI, then fills them up with an overload of random Pie charts (to make it nice and heavy and obvious), then sends some refresh commands to the second control... Since it takes about .2 seconds to refresh (on my machine which is a very low end cheap 64 bits CPU with maybe say 2 bits of cache...), it is really visible that also the first control refreshes. How do I refresh ONLY a single Control, or why can't I do it?

#include <GUIConstants.au3>

$gui = GUICreate("test",600,400)

$Graphic1 = GUICtrlCreateGraphic(0,0,280,400)
$Graphic2 = GUICtrlCreateGraphic(300,0,280,400)



For $filler1 = 1 To 1000



For $loop = 1 To 20


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...