Author Topic: Dynamic GUI properties  (Read 763 times)

In the GUI Editor, you would always have to press Apply to change the properties, and this is causing problems with my script. I have a GuiBitmapCtrl named GSC_InitProgress and I'd like to change the extent by script. I've tried redrawing the canvas and other stuff, but nothing works.

Anyone knows how?


gui.extent = "x y";

Did you even read my post? I'm not talking about the whole GUI, but only one control, GSC_InitProgress. I tried doing this, but on the control, and this doesn't work.

OK, Fine.

GSC_InitProgress.extent = "x y";

You must be doing it wrong, or you have strange vertSizing and horizSizing values.

Or you have multiple controls with the name "GSC_InitProgress" including one which is off the canvas, and since you can only address one object by name at a time there's a good chance it's the one you're not trying to alter. Do "GSC_InitProgress.delete();" loads of times until you get errors, then re-create it.

You don't have to "get sassy" with me, I did read your post and what I posted will work just fine provided you haven't done anything stupid and can manage to substitute "gui", "x" and "y" with the appropriate values.
« Last Edit: April 14, 2010, 12:20:00 PM by Ephialtes »

OK, Fine.

GSC_InitProgress.extent = "x y";

You must be doing it wrong, or you have strange vertSizing and horizSizing values.

Or you have multiple controls with the name "GSC_InitProgress" including one which is off the canvas, and since you can only address one object by name at a time there's a good chance it's the one you're not trying to alter. Do "GSC_InitProgress.delete();" loads of times until you get errors, then re-create it.

You don't have to "get sassy" with me, I did read your post and what I posted will work just fine provided you haven't done anything stupid and can manage to substitute "gui", "x" and "y" with the appropriate values.

I've been trying GSC_InitProgress.extent = "66 12"; and no result.

I've tried both deleting the control. I could use the command once, and the next time I got an error.
I've also tried deleting the whole GUI. I could use the command once, and the next time I got an error.

Tried re-executing and doing with no success. And after re-executing, GSC_InitProgress.visible was 1, but the control was not appearing. And yes, the extent was not 0 0 or something like that.
« Last Edit: April 14, 2010, 12:30:15 PM by Bauklotz »

About the invisible bitmap, the path must've saved wrong. Fixed now.

EDIT: The resizing works, thanks Ephialtes.