Custom subclass of App Designer Component doesn't show up
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
When constructing a custom UI component whose class inherits an App-Designer-Components class, the constructed component doesn't show up.
I can't figure out why, any ideas?
Or maybe, App-Designer-Components class were initilally thought to be sealed?
Thank you very much! ;)
FZ
test script:
hf = uifigure();
hb = UIButtonSubClass('Parent', hf);
custom class:
classdef UIButtonSubClass < matlab.ui.control.Button
properties
additionalProperty
end
methods
function this = UIButtonSubClass(varargin)
% constructor
this = this@matlab.ui.control.Button(varargin{:});
this.additionalProperty = 'something';
end
end
end
R2019b
1 Commento
Nicolas B.
il 31 Ott 2019
Looking to my test, MATLAB does not accept that a uifigure has a non-native MATLAB class as a children. So unfortunately, it's not possible to do what you want.
However, as alternative solution, you can freely use the property UserData of any MATLAB graphical class.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!