File Exchange

image thumbnail

ButtonGroup for HG2

version 1.2.0.0 (3.36 KB) by Clym Stock-Williams
Container object to manage radio or toggle buttons with the GUI Layout Toolbox - for 2014b onwards

1 Download

Updated 11 Sep 2015

View License

The ButtonGroup controls require the GUI Layout Toolbox by Ben Tordoff and David
Sampson available at:
http://www.mathworks.com/matlabcentral/fileexchange/47982-gui-layout-toolbox
The controls in this submissionshould be placed in the +uix folder in the GUI Layout Toolbox or in another folder called +uix that resides under a folder on your path.
Example:
gFig = figure();
gVButtonsBox = uix.VButtonGroup('Parent',gFig, 'Spacing',10,...
'ButtonSize', [200 40], 'ButtonStyle','radio',...
'HorizontalAlignment','left', 'VerticalAlignment','middle');
gVButtonsBox.Buttons = {'Button 1','Button 2', 'Button 3'};
gVButtonsBox.SelectionChangeFcn = {@(gSource,eventdata) disp(gSource.SelectedObject.String)};

Comments and Ratings (0)

Updates

1.2.0.0

Fixed issue with buttons turning off with multiple presses

1.1.0.0

Slight tidy ups. NB. Any suggestions on how to improve it very welcome

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: GUI Layout Toolbox

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor