Tk Source Code

View Ticket
Login
Ticket UUID: 659497
Title: hardcoded 2 pixel borders
Type: Bug Version: None
Submitter: nobody Created on: 2002-12-28 21:52:57
Subsystem: 20. [tk_optionMenu] Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2026-10-22 17:22:37
Resolution: Fixed Closed By: serhiy.storchaka
    Closed on: 2026-09-21 21:21:19
Description:
in tk_optionMenu{} (optMenu.tcl file), border width and
highlight thickness are hardcoded to 2 (ugly) pixels,
thus preventing setting an application wide 1 pixel
border width for widgets, using the option command.
(bug present in both 8.3 and 8.4 releases)

Jean-Luc Fontaine ([email protected])
User Comments: serhiy.storchaka added on 2026-09-21 21:21:19:

Since [f108de53ea] (8.5) the border width is not set by tk_optionMenu, so an application-wide *borderWidth option applies to it; only -highlightthickness 1 is still hardcoded.


dkf added on 2004-02-16 18:25:54:
Logged In: YES 
user_id=79902

You don't need [winfo parent] since you're supplying the
name of the menubutton as an argument.  OTOH, as Jeff says,
a combobox is a better choice for most GUIs.

hobbs added on 2004-02-14 06:58:35:
Logged In: YES 
user_id=72656

you can always configure [winfo parent] of what is returned
to you, but I think nowadays most people use comboboxes anyway.