uifigure alternatives for gcf, gcbf, gco, gcbo, gca, and any other legacy figure based functions
7 ビュー (過去 30 日間)
古いコメントを表示
Hello, I was wondering if any alternatives that work with the new uifigure windows are being developed for gcf, gcbf, gco, gcbo, gca, and any other legacy functions that used to work with legacy figures (guihandles, for example).
0 件のコメント
回答 (1 件)
Walter Roberson
2023 年 6 月 2 日
I used to think that those functions simplify didn't apply to uifigure and children. However someone indicated that the real issue is that by default handle visibility is off for those, and that if you turn handle visibility on that the functions will work. I have not tested this.
1 件のコメント
Abdou
2024 年 8 月 1 日
編集済み: Abdou
2024 年 8 月 1 日
That's true! I tested it and it works:
>> fig = uifigure(HandleVisibility = 'on'), f = gcf
fig =
Figure with properties:
Number: []
Name: ''
Color: [0.9400 0.9400 0.9400]
Position: [680 458 560 420]
Units: 'pixels'
f =
Figure with properties:
Number: []
Name: ''
Color: [0.9400 0.9400 0.9400]
Position: [680 458 560 420]
Units: 'pixels'
The default value of HandleVisibility property of a uifigure is set to 'off' to prevent the Figure object from becoming the current figure (gcf) and to prevent functions from making unwanted changes to the UI. MATLAB defaults to using the gcf or gca functions to get the target object for an operation, but these functions depend on the HandleVisibility property of the parent figure being 'on'.
参考
カテゴリ
Help Center および File Exchange で Develop uifigure-Based Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!