I still work on my "Wheel of fortune" game and I am in the following situation: I activate a GUI with consonants. Each consonant is a button. But I want that the consonants that was already used to be not active. So I will use something like a a string in which I store the fact that a latter was used or not and based on that, I will enable or not the button.
Example:
in the string consoane_folosite I store the following information: position B is corresponding to B, position 1 to C, etc. If B was used, then consoane_folosite[0] became a '*', so that in the gui I will use the sequence:
if (consoane_folosite.Chars[0]=='*') {
btn_B.Enabled = false; }
Until now I was able to use successfully the sequence in the script allocatted to the button. But that means that I HAVE TO PRESS FIRST the button, and after that it became "disabled".
I wish to run the sequence automatically, when GUI is activated, so that the corresponding buttons are already deactivated, if the case. In my example, if B was used already, I want the button B (btn_B) to be disabled before clicking on it.
How can I run my sequence automatically when activating the GUI ?
Thank you !
Example:
in the string consoane_folosite I store the following information: position B is corresponding to B, position 1 to C, etc. If B was used, then consoane_folosite[0] became a '*', so that in the gui I will use the sequence:
if (consoane_folosite.Chars[0]=='*') {
btn_B.Enabled = false; }
Until now I was able to use successfully the sequence in the script allocatted to the button. But that means that I HAVE TO PRESS FIRST the button, and after that it became "disabled".
I wish to run the sequence automatically, when GUI is activated, so that the corresponding buttons are already deactivated, if the case. In my example, if B was used already, I want the button B (btn_B) to be disabled before clicking on it.
How can I run my sequence automatically when activating the GUI ?
Thank you !