Re: [Tkinter-discuss] Ideas for user interface to allow users to change order of ttk.Notebook pages/tabs?

2010-12-15 Thread Michael Lange
Hi, Thus spoketh pyt...@bdurham.com unto us on Wed, 15 Dec 2010 00:30:12 -0500: > I'm using the ttk.Notebook widget to manage a list of open files. > I create and destroy tabs as a user opens and closes files. > > I would like to offer my users a way to change the order of the > notebook tabs.

[Tkinter-discuss] [Fwd: Change ttk.Notebook tab's font or font height?]

2010-12-15 Thread craf
- Mensaje reenviado > De: pyt...@bdurham.com > Para: Python-Tkinter > Asunto: [Tkinter-discuss] Change ttk.Notebook tab's font or font > height? > Fecha: Wed, 15 Dec 2010 00:54:37 -0500 > > Is there a way to change the ttk.Notebook tab's font or font height? > > Use case: I wou

[Tkinter-discuss] ttk.Notebook - how to bind to tab events (tab caption has focus or mouseover)

2010-12-15 Thread python
I'm using the ttk.Notebook widget. What object do I bind to capture events related to specific tabs? I would like to trap when a tab caption gets keyboard focus ('') and when the mouse pointer is over a specific tab caption (''). I can trap mouse clicks on tabs (, ), but I can't find a way to det

Re: [Tkinter-discuss] [Fwd: Change ttk.Notebook tab's font or font height?]

2010-12-15 Thread python
Cristian, > Here: http://code.activestate.com/recipes/541092-tknotebook/ > > Here's how to create a class to create notebook. With a little patience can > be converted for use with 8.5 tkinter.ttk and Python 3.1 Thank you! Malcolm ___ Tkinter-discuss

Re: [Tkinter-discuss] ttk.Notebook - how to bind to tab events (tab caption has focus or mouseover)

2010-12-15 Thread Michael Lange
Thus spoketh pyt...@bdurham.com unto us on Wed, 15 Dec 2010 09:28:51 -0500: > I'm using the ttk.Notebook widget. What object do I bind to > capture events related to specific tabs? > > I would like to trap when a tab caption gets keyboard focus > ('') and when the mouse pointer is over a specifi

Re: [Tkinter-discuss] Change ttk.Notebook tab's font or font height?

2010-12-15 Thread Michael Lange
Hi, Thus spoketh pyt...@bdurham.com unto us on Wed, 15 Dec 2010 00:54:37 -0500: > Is there a way to change the ttk.Notebook tab's font or font > height? > The following example seems to do what you want, at least unless you change the theme in use: ## from Tkinter impor

Re: [Tkinter-discuss] ttk.Notebook - how to bind to tab events (tab caption has focus or mouseover)

2010-12-15 Thread python
Michael, Thank you so much for your example!! Re: Detect mouse events on tabs. The trick for me was understanding how to use the index method. Your technique below is exactly the solution I was looking for (I wasn't aware of the '@%d,%d' formatting technique). index = event.widget.index('@%d,%d'

Re: [Tkinter-discuss] Change ttk.Notebook tab's font or font height?

2010-12-15 Thread python
Michael, > The following example seems to do what you want, at least unless you change > the theme in use > > f = tkFont.Font(family='helvetica', size=-12) > s = ttk.Style() > s.configure('.', font=f) That is **exactly** what I was looking for. Once again, thank you so much for your help. Tkin

Re: [Tkinter-discuss] ttk.Notebook - how to bind to tab events (tab caption has focus or mouseover)

2010-12-15 Thread Michael Lange
Hi, Thus spoketh pyt...@bdurham.com unto us on Wed, 15 Dec 2010 14:48:18 -0500: (...) > > Re: Detect when a tab caption has keyboard focus ( or similar). > > The <> does not correspond to the tab caption > gaining keyboard focus. > > And the notebook widget generates a single event when it g

[Tkinter-discuss] Very interesting code sample: A Ttk Notebook with close buttons

2010-12-15 Thread python
In researching how to determine when a ttk.Notebook tab caption has keyboard focus (still no luck), I stumbled across this code snippet which allows you to add Firefox-like close controls to your ttk.Notebook tabs. The close controls are added to the tab components via styles - they are not grafted

Re: [Tkinter-discuss] ttk.Notebook - how to bind to tab events (tab caption has focus or mouseover)

2010-12-15 Thread python
Michael, >> Is there a way to drill-down to the Tk label controls in the captions >> and bind to their events? Or is there a way to expose the tabs >> as actual widgets whose events can be bound to? > I don't think this is possible, it looks like the notebook widget itself > is one window that c

[Tkinter-discuss] as close windows by separate modules

2010-12-15 Thread craf
Hi. I have two modules: main.py- from tkinter import * from tkinter import ttk from code import Option class App: def __init__(self, master): master.protocol("WM_DELETE_WINDOW",Option.quit) master = Tk() master.geometry('640x480') app = App(master) master.mai