Filter löschen
Filter löschen

UItree: Changing the root

3 Ansichten (letzte 30 Tage)
Günter Gsellmann
Günter Gsellmann am 8 Jun. 2015
Kommentiert: Walter Roberson am 8 Jun. 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 Kommentar
Walter Roberson
Walter Roberson am 8 Jun. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by