AppDesigner / GUIDE: generate unknown number of new GUI elements as a function
Show older comments
Dear experts,
is there a way for the user to create new gui-elements, while the developed application is actually running?
For example:
- The application shows an Import button
- each time the user presses the import button, a new set of gui elements is created and their callback functions can be executed

Background:
I have an application (created with GUIDE and later compiled) that handles sensor data. The user sometimes only has 1 sensor but sometimes more sensors to analyze (e.g. up to 16). For each sensor, it requires a set of gui elements (and callback functions) that manages/displays sensor properties.
Currrently I need to provide all 16 sets of gui elements in order to support 16 sensors... if i want to support 20 sensors i would need to create new sets of gui elements and fill their callback functions with life.
My question is if I can automatically create the set of gui elements
- editbox_1
- popupmenu_1
- checkbox_1
and then another set
- editbox_2
- popupmenu_2
- checkbox_2
up to set
- editbox_x
- popupmenu_x
- checkbox_x
and assign a function to the accoring callback function. such as
- editbox_x_callback (that always calls the function "editbox_function"), where x could be any number
function editbox_x_callback(hObject, eventdata, handles)
editbox_function()
end
Accepted Answer
More Answers (0)
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!