Tk Library Source Code

View Ticket
Login
Ticket UUID: 2822970
Title: ScrollableFrame background
Type: Patch Version: None
Submitter: danckaert Created on: 2009-07-17 10:10:40
Subsystem: bwidget Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2009-07-17 22:27:10
Resolution: Accepted Closed By: oehhar
    Closed on: 2009-07-17 15:27:10
Description:
Here's another small patch for ScrollableFrame.
When the frame does not take up the whole canvas space, the canvas background shows through. This is more apparent when using ttk, because the canvas is not themed. However, here's an example without ttk:

option add *Canvas.background yellow
grid\
    [ScrollableFrame .sf -yscrollcommand [list .yscroll set]]\
    [scrollbar .yscroll -orient vertical -command [list .sf yview]]\
    -sticky news
grid rowconfigure . 0 -weight 1
grid columnconfigure . 0 -weight 1
set g [.sf getframe]
grid [label $g.a -text AAAAAA] [label $g.b -text BBBBBBB]
grid [label $g.c -text CCCCCC]
User Comments: oehhar added on 2009-07-17 22:27:10:
Correct. Patch committed.
TK:
Visible when canvas and frame have different default background colors.
TTK (Widget::themed true):
The situation is IMHO suboptimal.
With the patch, we get the background color of the style TFrame (which is better than before, the canvas default color).
But still, the -bg parameter failes. IMHO this is not easy to solve. Documentation in ScrolledFrame about this fact is missing too.
In consequence, the -bg and -background parameters are really not available if themed and there is a remark in the documentation.

danckaert added on 2009-07-17 17:10:41:

File Added - 335388: scrollframe.patch

Attachments: