Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ttk::notebook - how to turn off border

943 views
Skip to first unread message

Rich

unread,
Aug 10, 2013, 3:35:03 PM8/10/13
to
I am using a ttk::notebook as a panes manager as described here on the wiki:
http://wiki.tcl.tk/20057. The notebook widget is adding a 1 pixel wide
3-d border to anything inside the widget. Is there a way to turn off
the 1 pixel wide border?

The following code snippet shows the effect:

#!/usr/bin/wish

frame .top -width 200 -height 50
frame .bottom -width 200 -height 50
frame .left -width 50 -height 200
frame .right -width 50 -height 200

ttk::style theme settings default {
ttk::style layout Plain.TNotebook.Tab null
}
ttk::notebook .panes -style Plain.TNotebook

grid .top - - -sticky news
grid .left .panes .right -sticky news
grid .bottom - - -sticky news

frame .inthepane -width 100 -height 100

.panes add .inthepane

The result of running the above will be an otherwise empty toplevel
window with a 1-pixel wide 3-D border in the center around the
".inthepane" frame. It is that 1-pixel wide border that I would like
to turn off.

I've attempted to search the wiki for an answer, but so far an answer
has eluded me. I have tried the following:

% ttk::style layout TNotebook

but the above simply returns:

Notebook.client -sticky nswe

which is not very helpful.

If it helps any, I'm running under Linux with Tk version 8.5.8.

Thanks in advance,
Rich

Koen Danckaert

unread,
Aug 12, 2013, 4:23:40 AM8/12/13
to
On 10/08/13 21:35, Rich wrote:
> I am using a ttk::notebook as a panes manager as described here on the wiki:
> http://wiki.tcl.tk/20057. The notebook widget is adding a 1 pixel wide
> 3-d border to anything inside the widget. Is there a way to turn off
> the 1 pixel wide border?
>
> The following code snippet shows the effect:
>
> #!/usr/bin/wish
>
> frame .top -width 200 -height 50
> frame .bottom -width 200 -height 50
> frame .left -width 50 -height 200
> frame .right -width 50 -height 200
>
> ttk::style theme settings default {
> ttk::style layout Plain.TNotebook.Tab null
> }

Add the following:

ttk::style configure Plain.TNotebook -borderwidth 0

Koen

0 new messages