Borrar filtros
Borrar filtros

uifigure alternatives for gcf, gcbf, gco, gcbo, gca, and any other legacy figure based functions

14 visualizaciones (últimos 30 días)
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).

Respuestas (1)

Walter Roberson
Walter Roberson el 2 de Jun. de 2023
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 comentario
Abdou
Abdou el 1 de Ag. de 2024 a las 16:22
Editada: Abdou el 1 de Ag. de 2024 a las 16:27
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'.

Iniciar sesión para comentar.

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by