List box with strings, Append those strings in the title of the figures when clicking on it.?
Show older comments
I have a List box. Which has strings say red, blue, green. An image is also there. when clicking the red, it should appear on the title of the figure, likewise next by clicking blue, it should append with red, likewise green also.
Accepted Answer
More Answers (1)
Sean de Wolski
on 17 Aug 2012
figure;
imshow('cameraman.tif');
str = {'red','green','blue'};
hL = uicontrol('style','list','string',str,...
'callback',@(src,evt)title(sprintf('Color is: %s',str{get(src,'value')})));
1 Comment
Sabarinathan Vadivelu
on 18 Aug 2012
Categories
Find more on App Building in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!