I understand that you would like to create a UITable within the "App Designer" that lists the names of all the sliders used in your app. I am suggesting an approach to achieve this goal.
To illustrate this, I created a simple app using the App Designer and named it "app1." It includes three sliders named "slider_one," "slider_two," and "slider_three," as depicted in the image below.
Once you have created your app with the abve mentioned three sliders, please follow these steps to create a UITable of slider names:
- Add Components: From the "Component Library," add a UITable and a "button." The button will be used to update the UITable values. Your App Designer window will appear as shown below.
2) Select the Button: Click on the button and navigate to the "Callback" section on the right side of the App Designer window.
3) Create a Callback Function: Add a "ButtonPushedFcn" and name it "button_pushed" or choose any suitable name. This will automatically direct you to the "Code View" section, where you will see a function created with the name you provided.
4) Enter the Code: Within the function body, please enter the lines of code provided below.
function button_pushed(app, event)
for i=1:numel(properties(app))
if((mc.PropertyList(i).Validation.Class.Name)=="matlab.ui.control.Slider")
SliderNameCellArray{index} = mc.PropertyList(i).Name;
app.UITable.Data=SliderNameCellArray';
app.UITable.ColumnName="total sliders"
To understand the logic behind the code, you may refer to the attached links.
5) Save and Run: Save your code and press the "Run" button on the toolstrip. This will open your app. Click the button within the app to update the contents of the table, as illustrated in the figure below.
6) Alternative Method: Instead of adding an extra button to update the table values, you can define a "callback" for the UITable and enter the same lines of code into the corresponding callback.
For your convenience, I have attached the above designed app with this answer for your reference.
You can also add additional columns to the "UItable", displaying the names of other "UI objects". Make appropriate changes to the code and refer to the above attached documents.
I hope this approach is helpful !