473,473 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Tkinter radiobutton border

I've placed a radiobutton on a green panel. The background of the
radiobutton is also green. Borderwidth is 0 and relief is FLAT. I
still get a thin gray border around the radiobutton. What is this
border, and how can I get rid of it. Thanks.

Mike
Jul 18 '05 #1
2 4237
Mike wrote:
I've placed a radiobutton on a green panel. The background of the
radiobutton is also green. Borderwidth is 0 and relief is FLAT. I
still get a thin gray border around the radiobutton. What is this
border, and how can I get rid of it. Thanks.


Try

highlightthickness=0

Peter
Jul 18 '05 #2
Peter Otten's advice is correct, if all you want to do is get rid of
this 1-pixel area. However, you may want to use highlightbackground to
set it to green, so that the visual cue for "this widget has keyboard
focus" is retained.

To explain a little more, every widget has a "highlight rectangle"
around it, which has a thickness of highlightthickness and a color of
either highlightcolor (if the widget or a child has focus), or
highlightbackground (otherwise).

A few widgets may actually behave differently (buttons on win32 display
a dotted rectangle between the border and the contents, for instance).
Widgets that don't normally take focus (such as frames and labels) have
a 0 highlightthickness by default, but can be given a highlightthickness.

Widgets that tend to take keyboard focus default to a highlight
thickness of 1, with back for highlightcolor and the system background
color for highlightbackground. This is why I suggest that you consider
setting the highlightbackground to green.

If you create a scrolled area, you may want to set the
highlightthickness of the scrolled widget to 0, and that of the frame
that encloses it and the scrollbars to 1. This will make the focus
rectangle surround the scrolled widget and the scrollbars together.

Jeff

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: William Gill | last post by:
I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep references to them in a 2 dimensional list ( rBtns ). It works fine, and I can even make it so only one button per column can be...
0
by: rodrigo | last post by:
I have a Asp.net table control that I dynamically add rows from a SQL database. Inside the table, I add radiobuttons and they all have different ID numbers according to BindChain() Looking In...
0
by: rodrigo | last post by:
I have a Asp.net table control that I dynamically add rows from a SQL database. Inside the table, I add radiobuttons and they all have different ID numbers according to BindChain() Looking In...
1
kaarthikeyapreyan
by: kaarthikeyapreyan | last post by:
Beginners Game- Tic-Tac-Toe My first attempt after learning Tkinter from Tkinter import * import tkFont class myApp: """ Defining The Geometry of the GUI And the variables Used In the...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.