GUI

14 visualizaciones (últimos 30 días)
Murali Mohan
Murali Mohan el 7 de Jul. de 2011
I woluld like to plot a image on any push button or toggle button
can you pls guide me.

Respuesta aceptada

Gerd
Gerd el 7 de Jul. de 2011
Hi murali,
open GUIDE.
Place a button on the gui.
Go to the callback function
logo = imread('Logo.jpg','jpg');
image(logo);
Gerd
  8 comentarios
Murali Mohan
Murali Mohan el 7 de Jul. de 2011
Hi Gerd,Paulo
thanks for the answer.:)
Apart from that I have added
[X map] = imread('up_button.gif');
iconU = ind2rgb(X,map);
set(handles.pushbutton,'CData',iconU);
Paulo Silva
Paulo Silva el 7 de Jul. de 2011
Murali Mohan you accepted the wrong answer but thanks for posting the solution you chosen.

Iniciar sesión para comentar.

Más respuestas (2)

Jan
Jan el 7 de Jul. de 2011
Another approach:
pic = fullfile(tempdir, 'picture.png');
uicontrol('Style', 'pushbutton', ...
'String', '
<<file-----pic--.>>
');
  1 comentario
Murali Mohan
Murali Mohan el 7 de Jul. de 2011
Thanks Jan :)

Iniciar sesión para comentar.


Paulo Silva
Paulo Silva el 7 de Jul. de 2011

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by