I have 2 radio buttons on a form and when I load the form and then create the window.
Definition at the top of the class.
static RadioButton Gauge1RadioButton;
static RadioButton Gauge2RadioButton;
Then this code creates the window and tries to set the checked state of one of them depending on the settings.
CurrentWindow = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.optionsWindow));
Gauge1RadioButton = (RadioButton)CurrentWindow.GetChildByName("Gauge1RadioButton");
Gauge2RadioButton = (RadioButton)CurrentWindow.GetChildByName("Gauge2RadioButton");
if (isDualType())
Gauge1RadioButton.Checked = true;
else
Gauge2RadioButton.Checked = true;
It fails at the setting of the checked state. Both Radio Buttons have the same group name.
This is the exception
#### Exception System.ObjectDisposedException - CLR_E_OBJECT_DISPOSED (3) ####
#### Message:
#### Microsoft.SPOT.Bitmap:: DrawImage [IP: 0000] ####
#### Microsoft.SPOT.Bitmap:: DrawImage [IP: 0014] ####
#### GHI.Glide.Glide::Flush [IP: 0024] ####
#### GHI.Glide.Glide::Flush [IP: 0023] ####
#### GHI.Glide.Display.DisplayObject::Invalidate [IP: 0008] ####
#### AX9100DG.Program::InitOptionsWin [IP: 0075] ####
I get this every time I try to do this.