Borrar filtros
Borrar filtros

UItree: Changing the root

3 visualizaciones (últimos 30 días)
Günter Gsellmann
Günter Gsellmann el 8 de Jun. de 2015
Comentada: Walter Roberson el 8 de Jun. de 2015
I created an uitree as placeholder in a gui. After choosing a "profile", different mat files should be loaded as the new root. Unfortunatly this is not working, handles.NodeD = eventData.getCurrentNode, shows always just the original root
handles = guidata(figureHandle);
root = uitreenode('v0','handles.Ex',handles.str,handles.ipath,false);
handles.tree = uitree('v0',figureHandle,'Root', root, 'ExpandFcn', @myExpfcn);
set(handles.tree, 'Units', 'normalized', 'position', [0.001 0.001 0.15 0.995])
set(handles.tree, 'NodeWillExpandCallback', @TreeNodeWillExpand);
set(handles.tree, 'NodeSelectedCallback', @TreeNodeSelected);
%%%Profiles input
function MenuTako(figureHandle,eventData)
handles = guidata(figureHandle);
handles.Ex = load('RCR11P.mat');
handles.str = fieldnames(handles.Ex);
create_struct_tree
guidata(figureHandle,handles);
end
  1 comentario
Walter Roberson
Walter Roberson el 8 de Jun. de 2015
uitree() is an undocumented routine that has stayed undocumented since it was introduced in R14. There is therefore no way to say that it is working incorrectly. It does whatever it does.
There is nothing in the code you show that references MenuTako so there is no reason shown for it to ever be invoked.
You mention something about nested functions but you don't show one. You also don't show create_struct_tree
You do not make it easy to assist you.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Interactive Control and Callbacks 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