RadioButton with TinyCLR2.0, how to use them?

There is no sample for the RadioButton’s for TinyCLR.

I create them but I get an error as follows:

   #### Exception System.ArgumentOutOfRangeException - 0x00000000 (1) ####
    #### Message: No such radio button group exists.
    #### GHIElectronics.TinyCLR.UI.Controls.RadioButtonManager::GetCount [IP: 0018] ####
    #### GHIElectronics.TinyCLR.UI.Controls.RadioButton::Toggle [IP: 0008] ####
    #### GHIElectronics.TinyCLR.UI.Controls.RadioButton::OnTouchUp [IP: 0042] ####
    #### GHIElectronics.TinyCLR.UI.UIElement::OnTouchUpThunk [IP: 000b] ####
    #### GHIElectronics.TinyCLR.UI.RoutedEventArgs::InvokeHandler [IP: 0031] ####
    #### GHIElectronics.TinyCLR.UI.EventRoute::InvokeHandlers [IP: 00e8] ####
    #### GHIElectronics.TinyCLR.UI.UIElement::RaiseEvent [IP: 007a] ####
    #### GHIElectronics.TinyCLR.UI.Input.InputManager::ProcessStagingArea [IP: 00c6] ####
    #### GHIElectronics.TinyCLR.UI.Threading.Dispatcher::PushFrameImpl [IP: 007a] ####
    #### GHIElectronics.TinyCLR.UI.Threading.Dispatcher::PushFrame [IP: 0024] ####
    #### GHIElectronics.TinyCLR.UI.Threading.Dispatcher::Run [IP: 0006] ####
    #### GHIElectronics.TinyCLR.UI.Application::Run [IP: 0093] ####
    #### VoceanLoadCell.Program::Main [IP: 019a] ####
Exception thrown: 'System.ArgumentOutOfRangeException' in GHIElectronics.TinyCLR.UI.dll

I think you push the button to turn it on, and turn the button to change stations… But I could be wrong, it’s been a long time…

We already fixed it. The source is open. You can add reference or wait to next release.

1 Like

Thanks Dat. I eventually got them to work by not adding the group name as I only had one set of radio buttons. I’ve since made the update to grab the changes you made and it all works fine. The fix allows you to have more than 1 group of them in the same window.

Yes, that is correct. Thanks for verify.