How to create a GUI in App Designer starting from existing code
Mostrar comentarios más antiguos
I am attempting to use AI to generate an initial design for a GUI. I would like to copy the code that is generated and input it directly into the Code View of the App Designer. I would then like to make further adjustments using some of the App Designer tools (i.e. Design View). However, I cannot copy the code directly over, as App Designer doesn't let the user edit portions of the code. Is there a way to edit the grayed-out code? Or a way to easily integrate the generated code into an .mlapp file?
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 10 de Ag. de 2025
0 votos
Are you saying that you used some AI tool to build an .mlapp file that had all the buttons, listboxes, etc. made to your liking? (The .mlapp file is a binary file, by the way, not a text file, until it's brought into appdesigner) And that .mlapp file had code in the gray, uneditable portions that specified properties for components like size, location, color, value, items, etc.?
Well, if it's a valid .mlapp file that your AI tool made, then you can open it up with AppDesigner and then change the properties that you want to change in the properties panel (below the list of components in the upper right). The callback code of those components can be edited directly in the Code View window (they'll be white) but the properties (that code will have a gray background) must be edited in the properties panel in the lower right of your screen.
3 comentarios
Michael
el 10 de Ag. de 2025
Image Analyst
el 11 de Ag. de 2025
You build the app as you like it in appdesigner, with all the buttons, etc. Then copy and paste the code that your AI tool generated into the callbacks. Right click on a component (like a button) and tell it to create a callback and then paste your code into it. If you want non-callback functions then you can use the Code panel on the left side to create a new private function and then paste your AI code into that. Neither of those two situations will have grayed out code that you can't paste into.
Michael
el 11 de Ag. de 2025
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!