Effacer les filtres
Effacer les filtres

UItree: Changing the root

3 vues (au cours des 30 derniers jours)
Günter Gsellmann
Günter Gsellmann le 8 Juin 2015
Commenté : Walter Roberson le 8 Juin 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 commentaire
Walter Roberson
Walter Roberson le 8 Juin 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by