Scrolling down drop down list

10 visualizaciones (últimos 30 días)
Khalala Mamouri
Khalala Mamouri el 31 de Ag. de 2020
Editada: Adam Danz el 31 de Ag. de 2020
Hi,
i am developping an app in app designer, but i am runing out of space for the drop down list. i wonder if there is a way to make a scrolling dropdown list, just like web pages when you want to go further down you just keep clicking on the rectangle think to the right of the screen.
this is my code :
list = load('Vehiclelist.mat');
assignin('base','list', list);
app.VehicleModelDropDown.Items = list.Vehiclelist;
Vehiclelist = [app.VehicleModelDropDown.Items New_Bat_Name];
save('Vehiclelist.mat','Vehiclelist','-append');
app.VehicleModelDropDown.Items = Vehiclelist;
%% scroll(app.VehicleModelDropDown.Items,1,1); %% << Somewhere here i want to put the
%% scrolling thing
thank you
  3 comentarios
Khalala Mamouri
Khalala Mamouri el 31 de Ag. de 2020
Yes adam, i think it is easier with a list box. Please, is there a way make this list box show only one item, and when clicking on it (interact with ) it shows a list just like the fig bellow
thank you
Adam Danz
Adam Danz el 31 de Ag. de 2020
No, I don't believe that's possible. You could shrink the height so that it only shows 1 item at a time but it will still only show 1 line at a time when scrolling through it.

Iniciar sesión para comentar.

Respuestas (1)

Mario Malic
Mario Malic el 31 de Ag. de 2020
Editada: Mario Malic el 31 de Ag. de 2020
app.DisplayDropDown.Items = app.Legend_Str; % This is cell 1xn that contains char arrays
This works for me. I believe it appears when the items cannot fit the main window.
You don't have scrolling thing because, most likely you did not load all the data.
  1 comentario
Adam Danz
Adam Danz el 31 de Ag. de 2020
+1, yes - once the list gets too long it will automatically add a vertical scoll bar.

Iniciar sesión para comentar.

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by