<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>how do I select radionbutton by default? </DIV><DIV>for my school project, I need to have 10 radio buttons and have half of them selected</DIV><DIV>I have</DIV><DIV>for i in range(10):</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">  </SPAN>x = IntVar()</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>if i < 5:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">         </SPAN>rb = Radiobutton(buttonFrame, variable=x, value=1,state=DISABLED)<SPAN class="Apple-tab-span" style="white-space:pre">   </SPAN></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">     </SPAN>else:</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>rb = Radiobutton(buttonFrame, variable=x, value=0,state=DISABLED)<SPAN class="Apple-tab-span" style="white-space:pre">   </SPAN></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I tried x.set(1) or x.set(0) before or after but the all seem to be deselected when displayed on the screen</DIV><DIV>I also tried calling rb.select/deselect() but that doesn't seem to work either...<SPAN class="Apple-tab-span" style="white-space:pre"></SPAN></DIV><DIV>can anyone help me?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Sang Park</DIV><DIV><A href="mailto:lordofthefobs@gmail.com">lordofthefobs@gmail.com</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>