Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Mark Lawrence Newsgroups: comp.lang.python Subject: Adding borders to ttk radiobuttons Date: Wed, 30 Mar 2016 14:14:18 +0100 Lines: 25 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de hsIBa8v+oJZU3b99D49znQlZ7yaB71KC1nSqVhwl3sBg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'root': 0.04; 'from:addr:yahoo.co.uk': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'sadly': 0.16; 'subject:Adding': 0.16; 'language': 0.19; 'windows': 0.20; 'lawrence': 0.22; 'tkinter': 0.22; 'import': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'skip:s 30': 0.31; 'language.': 0.32; 'something': 0.35; 'should': 0.36; 'to:addr:python-list': 0.36; 'display': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'mark': 0.40; 'our': 0.64; 'believe': 0.66; '3.5.1': 0.84; 'pythonistas,': 0.84; 'ttk': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 80.234.189.93 X-Mozilla-News-Host: news://news.gmane.org:119 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:106069 I believe something like this should suffice to display borders around the radiobuttons. import tkinter as tk import tkinter.ttk as ttk root = tk.Tk() style = ttk.Style() style.configure('BW.TRadiobutton', borderwidth=5) buttonVar = tk.IntVar() rb1 = ttk.Radiobutton(text='Hello mum', variable=buttonVar, value=1) rb1.configure(style='BW.TRadiobutton') rb1.grid(row=0, column=0) rb2 = ttk.Radiobutton(text='Hello dad', variable=buttonVar, value=2) rb2.configure(style='BW.TRadiobutton') rb2.grid(row=1, column=0) root.mainloop() Sadly no borders :( What have I missed? Python 3.5.1 on Windows 10. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence