フィルターのクリア

How can I access the code behind the uitable; if I create the uitable with GUIDE (not with the uitable-command)?

1 回表示 (過去 30 日間)
I can access the code of a uitable when initiating it with the uitable-command. I am however unable of changing the code of a table (uitable) constructed graphically with GUIDE.
  2 件のコメント
Adam
Adam 2014 年 12 月 2 日
What do you mean by "the code"?
Jan
Jan 2014 年 12 月 2 日
The question is not clear. What do you want to achieve?

サインインしてコメントする。

採用された回答

Adam
Adam 2014 年 12 月 3 日
The uitable will have a 'Tag' property in your GUIDE gui. I always rename this to something sensible but if you don't it is probably 'uitable1' or something.
In any callback function you can access it as:
handles.uitable1
e.g.
set( handles.uitable1, 'Data', someData );
Basically you can access any property like that just as you could if you created it yourself.
  2 件のコメント
Andre
Andre 2014 年 12 月 3 日
Thanks Adam; but the workspace still cannot reference it (non-existent), unlike when I create it with uitable (in the m-file).
Adam
Adam 2014 年 12 月 3 日
You have to access it from a callback of the UI, it doesn't appear in the base workspace.
You can initialise it in the OpeningFcn and then access it any time after that from a callback.

サインインしてコメントする。

その他の回答 (2 件)

Andre
Andre 2014 年 12 月 2 日
Hi,
With code I mean by means of coding (opposed to just constructing it with GUIDE icons and mouse-drag-click).
I want to modify the code for a table I placed using GUIDE (graphical, not by placing a table with uitable).
I hope that clarifies it.

Andre
Andre 2014 年 12 月 4 日
Thanks; the callback into the GUI was required to access it; even if a callback for another item. Nonetheless, it works now. Thanks for everyone's feedback. Have a great day.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by