Create radiobutton without button group
3 ビュー (過去 30 日間)
古いコメントを表示
I would like to create radio buttons without a button group, align them myself by assigned them to a layout as their parent, and implement a simple toggle function for all radio buttons within a ButtonPushed callback (same for all buttons).
However, when I call uiradiobutton(), MATLAB only accepts ButtonGroups as parent handle.
>> uiradiobutton(uifigure())
Error using uiradiobutton
'Parent' value must be specified as a ButtonGroup object.
Why does MATLAB not allow me to use a uilayout or a uifigure object as parent of a radio button?
0 件のコメント
回答 (1 件)
Voss
2022 年 11 月 9 日
I don't know why a radio button's parent must be a button group, but you can set the button group's BorderType to 'none', so that the radiobutton(s) appear to be contained directly in the button group's parent container.
2 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!