Borrar filtros
Borrar filtros

How to set the property for jslider

1 visualización (últimos 30 días)
TAY
TAY el 5 de Nov. de 2014
Comentada: TAY el 12 de Nov. de 2014
%This is what I have declare in the OpeningFcn
[class,handles.jSlider_brightness] = javacomponent(javax.swing.JSlider,[440,340,350,40]); set(class,'PaintTicks',1,'SnapToTicks',0,'MajorTickSpacing',1,'PaintLabels',1,'PaintTrack',1,'maximum',1,'minimum',-1,'value',0); set(handles.jSlider_brightness,... 'StateChangedCallback',{@jSlider_brightness_Callback, handles});
%%I have a callback function as below :
_________________________________________________________
function jSlider_brightness_Callback(hObject, eventdata, src) global hLoadFile; handles = guidata(src); listIdx = get(handles.popupmenu_colormap,'Value'); handles.beta = get(handles.jSlider_brightness,'value'); handles.new_colormap_P = brighten(hLoadFile.handles.colormap.all_colormap{listIdx},handles.beta); colormap(handles.axes_fig,handles.new_colormap_P); % Update structure guidata(hObject,handles);
____________________________________________________________
this gui is to update the brightness of the colormap when sliding the slider but it only allow me to show the result with -1,0,. Anyone know how to solve this problem?
Thank you in advance!!!

Respuesta aceptada

Yair Altman
Yair Altman el 12 de Nov. de 2014
  1 comentario
TAY
TAY el 12 de Nov. de 2014
Sorry, I dont really get it, will be better with some explains. Thank you.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by