Jump to content
Sign in to follow this  
BlueScreen

What is the limitation of 'GuiSetControl'?

Recommended Posts

BlueScreen

Check this ugly script

global $x=0

GuiCreate ("",730,450)
while 1
myfunc ()
wend


Func myfunc ()
    mygui ()
    $x=$x+1
    sleep (500)      
EndFunc
;-----------------------------------------------------------------------------------------

;-----------------------------------------------------------------------------------------
Func mygui ()
    GuiSetControl ("label", "Current iteration is " & $x, 10,30,700,20)
    GuiSetControl ("label", "abcd", 10,60,700,20)
    GuiSetControl ("label", "abcd", 10,70,700,20)
    GuiSetControl ("label", "abcd", 10,80,700,20)
    GuiSetControl ("label", "abcd", 10,90,700,20)
    GuiSetControl ("label", "abcd", 10,100,700,20)
    GuiSetControl ("label", "abcd", 10,110,700,20)
    GuiSetControl ("label", "abcd", 10,120,700,20)
    GuiSetControl ("label", "abcd", 10,130,700,20)
    GuiSetControl ("label", "abcd", 10,140,700,20)
    GuiSetControl ("label", "abcd", 10,150,700,20)
    GuiSetControl ("label", "abcd", 10,160,700,20)
    GuiSetControl ("label", "abcd", 10,170,700,20)
    GuiSetControl ("label", "abcd", 10,180,700,20)
    GuiSetControl ("label", "abcd", 10,190,700,20)
    GuiSetControl ("label", "abcd", 10,200,700,20)
    GuiSetControl ("label", "abcd", 10,210,700,20)
    GuiSetControl ("label", "abcd", 10,220,700,20)
    GuiSetControl ("label", "abcd", 10,230,700,20)
    GuiSetControl ("label", "abcd", 10,240,700,20)
    GuiSetControl ("label", "abcd", 10,250,700,20)
    GuiSetControl ("label", "abcd", 10,260,700,20)
    GuiSetControl ("label", "abcd", 10,270,700,20)
    GuiSetControl ("label", "abcd", 10,280,700,20)
    GuiSetControl ("label", "abcd", 10,290,700,20)
    GuiSetControl ("label", "abcd", 10,300,700,20)
    GuiSetControl ("label", "abcd", 10,310,700,20)
    GuiSetControl ("label", "abcd", 10,320,700,20)
  
    GuiShow ()
EndFunc

Currently, the GUI stops refreshing at iteration #18.

What is the exact limitation? :ph34r:

10x

Share this post


Link to post
Share on other sites
Valik

Only 500-ish controls can be created. That's right around that number.

Share this post


Link to post
Share on other sites
BlueScreen

I see. What can be done?

I have to display this window with all these parameters every few seconds. Can I somehow use GUIHIDE () to start the limitation counter?

If you can base on my code submitted, it will be GREAT!!! :ph34r:

Share this post


Link to post
Share on other sites
Valik

You have a serious error in your logic going on there. You are creating a new control every time. You need to store the control references, then use GuiWrite() to change what the controls display.

Share this post


Link to post
Share on other sites
BlueScreen

Hmmm... Right. Here is my bug.

I'll use GuiWrite ().

Thanks alot,

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.