Does exist select / option button ?

This is the place for queries about ThorPy issues : installation, coding, ...
Posts: 44
Joined: Thu Feb 25, 2016 10:34 am

Does exist select / option button ?

Postby buffalo » Sat Feb 27, 2016 5:46 pm

I'm looking for a button like this :

<select name="select">
<option value="value1">Valeur 1</option>
<option value="value2" selected>Valeur 2</option>
<option value="value3">Valeur 3</option>

Posts: 3
Joined: Wed Sep 02, 2015 9:59 pm

Re: Does exist select / option button ?

Postby Rudolfenstein » Sun Feb 28, 2016 8:39 pm


Yes it does. It is a DropDownListLauncher.

Code: Select all

values = ["option a", "option b", "option c"]
select_list = thorpy.DropDownListLauncher.make(const_text="Choose something in the list", #title text, can be empty
                         var_text=values[0] #predefined value (can be wathever you want)
                         titles=values) #actual values than user can choose into the list

An example of use can be found in this example, on lines 24-28:

Also, the full prototype can be found in the cheatsheet.

Note that you can get and set the value with get_value() and set_value(str) methods.

Return to “General ThorPy help”

Who is online

Users browsing this forum: No registered users and 1 guest