ButtonGroup Objects

Container objects to manage radio or toggle buttons with functionality of the GUI Layout Toolbox
ダウンロード: 1.3K
更新 2011/6/21

ライセンスの表示

The ButtonGroup controls require the GUI Layout Toolbox by Ben Tordoff and David
Sampson available at:
http://www.mathworks.com/matlabcentral/fileexchange/27758-gui-layout-toolbox
The controls in this submissionshould be placed in the +uiextras folder in the GUI Layout Toolbox or in another folder called +uiextras that resides under a folder on your path. It is recommended to run rehash path after doing this.

EXample:
function buttonGroupExample
f = figure;
vb = uiextras.VBox('Parent',f,'Units','Normalized');
bgH = uiextras.HButtonGroup('Parent',vb,'Buttons',{'1','2','3'},'Spacing',50,'Padding',10,'SelectedChild',1,'SelectionChangeFcn',@onSelectionChange);
hb = uiextras.HBox('Parent',vb);
bgV = uiextras.VButtonGroup('Parent',hb,'ButtonStyle','toggle','Buttons',('123')','Spacing',20,'Padding',10,'SelectedChild',3,'SelectionChangeFcn',@onSelectionChange);
p = uiextras.Panel('Parent',hb);
set(hb,'Sizes',[100,-1]);
lblDisplay = uicontrol('Parent',p,'FontSize',16,'Style','text');
onSelectionChange([],[]);
function onSelectionChange(src,evt)
disp(evt);
set(lblDisplay,'String',int2str([bgH.SelectedChild,bgV.SelectedChild]));
end %onSelectionChange
end %buttonGroupExample

引用

Matthew Whitaker (2024). ButtonGroup Objects (https://www.mathworks.com/matlabcentral/fileexchange/31902-buttongroup-objects), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2011a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersApp Building についてさらに検索
タグ タグを追加
謝辞

ヒントを得たファイル: GUI Layout Toolbox

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0