Visible property desn't work

May 21, 2013 at 11:01 AM
Me again ^^

i post all my mistakes i found cause im becoming using this librery so ... he is today's mistake.
the propertu .visible= false; don't work FOR THE IMAGES.
i mean, if i use the image controle box, the visible property doesn't work when i fixe it to false, but it work with the other controles like textbox.

so this is my code :
background = new Image(new Rectangle(0, 0, 800, 600), Content.Load<Texture2D>("gfx/map/login/bg/loginBG"));
background.ZIndex = 0;            //ZIndex doesn't work either
background.Visible = false;       // image still visible
the picture is always visible but using a textbox like this :
username = new RamGecXNAControls.TextBox(new Rectangle(410, 240, 120, 25), "");
username.ZIndex = 100;
username.Visible = false;
the textbox is invisible.

i've found another way to make it invisible, :
background.Transparency = 0F;
that resolve my probleme but i prefere the Visible methode,
any cloue ?