Adding a title to uiimage
Mostrar comentarios más antiguos
I am working with matlab app designer, matlab 2020b
essentially I want to have several dragable objects that look like pipe sections, connect and reconnect them, and change their sizes. each section should have a label.
So far I have worked with several UIbutton objects, dragging them around. However, I encountered two problems that i couldnt solve.
1. UIbuttons have these annoying borders that cannot be cancelled, and
2. the pictures cannot be streched properly according to my needs.the attached picture demonstrates this nicely- at the bottom you can see a UIbutton. when you try to strech it the picture behaves in a very annoying fashion. at the top tou have a UIimage, that streches correctly when you change its dimensions.
so i decided to use UIimages instead. my problem now is how to insert the label properly. images don't seem to have any option for adding a label or a title.
would be thankful for any assistance.
5 comentarios
Mario Malic
el 8 de Feb. de 2021
Hi Nathan,
Regarding the resizing images and UIImage component, it has a property called ScaleMethod, check it, maybe that will solve your issue.
You can create label and adjust its Position property through events and listeners. Maybe you can change the label positions at the end of the drag and drop callback? Unfortunately I can't help with this as I've never worked with them.
Nathan Blanc
el 8 de Feb. de 2021
Mario Malic
el 8 de Feb. de 2021
That's true, but button is not really ment to behave like that.
If you're adventurous, you can also create your own component, there are more sites that you can find information about it, here's one https://www.mathworks.com/help/matlab/creating_guis/add-ui-components-to-app-designer-programmatically.html.
Maybe someone else might have a better idea.
Nathan Blanc
el 8 de Feb. de 2021
Mario Malic
el 8 de Feb. de 2021
That's true, well, here's the link you need. It's available from R2020b
Respuestas (0)
Categorías
Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!