uipanel border type problem
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am designing a GUI where I want to nest 2 or 3 panels in such a way they are perfectly aligned. If I run the following code to nest 100 panels (just an extreme example) inside each other:
a = figure
b=uipanel(a, 'units', 'pixels', 'position', [10, 10, 200, 200]);
for i=1:99
b = uipanel(b, 'units', 'pixels', 'BorderType', 'etchedout','OuterPosition', [1, 1, 200, 200]);
b.Position(1:2) = b.Position(1:2)-b.BorderWidth;
end
I get this:
I corrected the border width offset, but still the panels are not properly aligned. This problem doesn't happen if I use a border of type 'line'. Is there any way to perfectly align all the nested panels for any border type?
In addition, for a 'BorderWidth' of 1, a border of type 'line' has still a different width than a border of type 'etchedout'. It also should be '0' when border type is 'none', but is still '1'. How to find the true border width?
Regards
5 comentarios
Jan
el 2 de Mayo de 2018
@André: Please post the code, which creates the shown figure and which reproduces the problem. This is more useful than posting some other code, which creates 100 nested panel, which you do not need at all. I'm not sure, which detail the actual problem is.
Respuestas (0)
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!