# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Dropdown list from max and min value

Hi,

I want to create a dropdown menu of natural numbers; I want to input maximum and minimum value and it should show me the list of all natural numbers between these two numbers. My idea was to create an array with for loop and connect it with drop down list. But it seems like my MATLAB logic is useless here and couldn't figure out how even create an array. Any suggestion? Thanks.

Message 1 of 9
(1,425 Views)

## Re: Dropdown list from max and min value

So you have three controls:

Two integer controls to enter lower and upper limit

A ring that will fill with items containing all integers in-between. (within reason, you don't want a million entries!). The terms "between" is a bit fuzzy, but I assume you also want to include the limits in the ring.

Should be trivial. Code will fit on a postage stamp. What have you tried?

Message 2 of 9
(1,409 Views)
Solution
Accepted by topic author mub.re

## Re: Dropdown list from max and min value

Try this:

Don't forget the learning resources listed at the top of the forum.

Message 3 of 9
(1,404 Views)

## Re: Dropdown list from max and min value

Thanks! I was trying with for loop and array to connect with combo-box

Message 4 of 9
(1,379 Views)

## Re: Dropdown list from max and min value

@mub.re wrote:

I was trying with for loop and array to connect with combo-box

That sentence has absolutely no information content. 😄

Message 5 of 9
(1,364 Views)

Message 6 of 9
(1,358 Views)

## Re: Dropdown list from max and min value

Hi,

one more question. How can I get the selected number? When I try to extract, it gives me only values(0,1,2..).

Message 7 of 9
(1,336 Views)
Solution
Accepted by topic author mub.re

## Re: Dropdown list from max and min value

@mub.re wrote:

Hi,

one more question. How can I get the selected number? When I try to extract, it gives me only values(0,1,2..).

You can us the value to index into the blue array to get the number or you could write the strings&values property instead.

Here are two possibilities:

Message 8 of 9
(1,328 Views)

## Re: Dropdown list from max and min value

You are a lifesaver, thanks!

Message 9 of 9
(1,315 Views)