Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Disable RadioButton

$
0
0

Hi, everyone

items_to_disable = ["Mild steel", "4140"]

for rb in self.radiobuttonlist.Children:
    if isinstance(rb, Eto.Forms.RadioButton):
        if rb.Text in items_to_disable:
            rb.Enabled = False

the posted code is taken from the file shared by Clement, used to disable RadioButton from radiobuttonlist

it would be possible to have the same result, without having to use the for loop and the two if?

thanks for the answer (if there is an answer)

10 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles