how to put only one item in the listbox
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Luca Re
am 12 Nov. 2023
Kommentiert: Walter Roberson
am 13 Nov. 2023
I want to fill the space of the box only with one element from the list I tried making the font bigger but it doesn't work bold type works instead
string(Function_Categorical_Struct("TypeEquity"))
sst=string(Function_Categorical_Struct("TypeEquity"));
app.ChoiseEquityListBox.Items=sst;
app.ChoiseEquityListBox.Value=sst(1);
app.ChoiseEquityListBox.FontWeight='bold';
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 13 Nov. 2023
Are you trying to create a list that only has a single element? Such as
app.ChoiseEquityListBox.Items = {'Filtered'};
app.ChoiseEquityListBox.Value = app.ChoiseEquityListBox.Value{1};
Or do you have a listbox with multiple elements but you want to arrange that when the listbox is displayed normally, that only the current value is visibile?
If you want only one element to be visible ... then use a drop box instead of a listbox.
But if there is specific reason to make it a uilistbox, then set the last component if its Position property to roughly 20.
2 Kommentare
Walter Roberson
am 13 Nov. 2023
The last component is height. I am suggesting that if you use default font size that a height of 20 looks good to frame a single line of choice.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!