Forum Discussion

renatoveronese's avatar
renatoveronese
New Contributor
9 years ago

How to select a random item in combobox? (C# Script)

hi, i have one combobox with the itens:

Jenny, Robert, Juan, Kenny.

I want to select a random item from this combobox.

How i do it in C# Script?

 

 

1 Reply

  • Generate a random number (between 0 and 3 in this case) and select by index number.

     

    How you apply the select on the dropdown depends on the type of dropdown it is. I have 3 different ones in my Delphi app and they all use completely different ways (some simple, some not) to select things.