フィルターのクリア

Uitable handles

5 ビュー (過去 30 日間)
Thulasi Durai Durai Samy
Thulasi Durai Durai Samy 2012 年 5 月 29 日
コメント済み: Image Analyst 2021 年 7 月 6 日
Hello
I used a command pl_one=uitable (......) in a function and the pl_one is declared as global variable so as to access in other function. but in other function if I try to use the object handle pl_one matlab says error. But I try to do for other gui text box, check box it work properly. Why uitable() handle is not accessible in other function. findobj() can identify the object and returns the handle even though i cannot access the table data or modify the property. Can some one help me.

回答 (3 件)

Dmitry
Dmitry 2012 年 7 月 11 日
Global variable is not a good solution, it's better to put handle to handles structure:
handles.pl_one = pl_one; guidata(hObject, handles);
It will be accessible in other callbacks in handles.pl_one.
Anyway, I tested you situation and it works fine too:
global pl_one; pl_one=uitable();
and in another callback:
global pl_one; get(pl_one);
Post your code to find out what is the problem.

Image Analyst
Image Analyst 2012 年 7 月 11 日
Did you declare it global in the other function also? It needs to be global in both functions if that function will be able to see it. How did you access it? You need to talk to the table using the get() function to read properties or data from the table, and the set() function to set properties of the table or send data to it.

youcef Cherief
youcef Cherief 2021 年 7 月 6 日
How do we extract information from a table guide?
  1 件のコメント
Image Analyst
Image Analyst 2021 年 7 月 6 日
data = handles.uitable1.Data;

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

カテゴリ

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