Tk Source Code

View Ticket
Login
Ticket UUID: 1683795
Title: -padx obscures button text on Aqua
Type: Bug Version: None
Submitter: arobert3434 Created on: 2007-03-19 16:18:08
Subsystem: 03. [*button] and [label] Assigned To: aku
Priority: 5 Medium Severity: Minor
Status: Pending Last Modified: 2026-09-25 14:28:50
Resolution: None Closed By: nobody
    Closed on:
Description:
button .b -text Foobazzulous -padx 5 ; pack .b

This blots out the edges of the text in the Carbon-based Aqua native version of Tk (all versions I've tried: 8.4.x, 8.5a5).  This behavior is not observed on XWindows-based implementations of Tk.

A related concern is a cross-platform incompatibility: a small -padx is necessary in many cases on XWindows versions to avoid the text crowding against the edges of the button, however in Aqua-native such padding is unnecessary.  Not sure what to suggest here however.
User Comments: kevin_walzer added on 2026-09-25 14:28:50:
Issue not observed in Tk 9.1 tip.

serhiy.storchaka added on 2026-09-25 12:05:01:

The Carbon code is gone. The current Cocoa button code adds room for the native push button bezel on top of the text and -padx, and places the text inside the padding, so button .b -text Foobazzulous -padx 5 should no longer clip the text. Can someone on macOS confirm with 8.6.18 or 9.0?


arobert3434 added on 2008-08-06 10:54:14:
Logged In: YES 
user_id=146959
Originator: YES

Still present in 8.6a1.