On Wed, 6 Jan 2021, Terry Reedy wrote:
'underline' has nothing to do with looking up the command in
self.callbacks. It is a keyword parameter for the add_command method, and
is handled like all other values passed by name, and as you did for the
other arguments
file_menu.add_command(
On 1/6/2021 4:17 PM, Terry Reedy wrote:
On 1/6/2021 4:03 PM, Rich Shepard wrote:
On Thu, 7 Jan 2021, Chris Angelico wrote:
Are you sure that this works? It's syntactically valid, but I don't
think it means what you think it does.
ChrisA,
I'm always open to learning. There's no error generat
On Thu, 7 Jan 2021, Peter Otten wrote:
Spoiler: unless the name 'underline' is defined you get a NameError:
NameError: name 'underline' is not defined
If it is defined and self.callbacks is a dict you get a TypeError:
TypeError: unhashable type: 'slice'
because that's what a colon means in a con
On 06/01/2021 22:03, Grant Edwards wrote:
I'm completely baffled by that. Can somebody explain how this
expression is evaluated?
self.callbacks['file->new', underline: 0]
It appears that the dict callbacks is being accessed with the key of
a tuple comprising a string and a slice.
Huh?
Y
On 06/01/2021 22:03, Rich Shepard wrote:
On Thu, 7 Jan 2021, Chris Angelico wrote:
Are you sure that this works? It's syntactically valid, but I don't
think it means what you think it does.
ChrisA,
I'm always open to learning. There's no error generated ... yet the
application doesn' open so
On Thu, Jan 7, 2021 at 9:22 AM Grant Edwards wrote:
>
> On 2021-01-06, Rich Shepard wrote:
> > On Wed, 6 Jan 2021, 2qdxy4rzwzuui...@potatochowder.com wrote:
> >
> >> For the sake of future generations who may run into this issue, can you
> >> post the complete, correct call to file_menu.add_comma
On 1/6/2021 4:03 PM, Rich Shepard wrote:
On Thu, 7 Jan 2021, Chris Angelico wrote:
Are you sure that this works? It's syntactically valid, but I don't
think it means what you think it does.
ChrisA,
I'm always open to learning. There's no error generated ... yet the
application doesn' open so
On 2021-01-06, Rich Shepard wrote:
> On Wed, 6 Jan 2021, 2qdxy4rzwzuui...@potatochowder.com wrote:
>
>> For the sake of future generations who may run into this issue, can you
>> post the complete, correct call to file_menu.add_command?
>
> This is the working version of the stanza I initially pos
On Thu, 7 Jan 2021, Chris Angelico wrote:
Cool. Terry had something on the subject in the other thread; I think
that's a good place to start. (I don't know much about Tkinter, this line
of code just looked odd in general Python syntax.)
ChrisA,
It's been a long time since I wrote any Python c
On Thu, Jan 7, 2021 at 8:04 AM Rich Shepard wrote:
>
> On Thu, 7 Jan 2021, Chris Angelico wrote:
>
> > Are you sure that this works? It's syntactically valid, but I don't
> > think it means what you think it does.
>
> ChrisA,
>
> I'm always open to learning. There's no error generated ... yet the
On Thu, 7 Jan 2021, Chris Angelico wrote:
Are you sure that this works? It's syntactically valid, but I don't
think it means what you think it does.
ChrisA,
I'm always open to learning. There's no error generated ... yet the
application doesn' open so it's time to run it through pdb.
Regards
On Thu, Jan 7, 2021 at 7:43 AM Rich Shepard wrote:
> This is the working version of the stanza I initially posted:
>
> file_menu.add_command(
> label = 'New',
> command = self.callbacks['file->new', underline: 0],
> accelerator = 'Ctrl+N'
> )
On Wed, 6 Jan 2021, 2qdxy4rzwzuui...@potatochowder.com wrote:
For the sake of future generations who may run into this issue, can you
post the complete, correct call to file_menu.add_command?
This is the working version of the stanza I initially posted:
file_menu.add_command(
On 1/6/2021 1:32 PM, Rich Shepard wrote:
My application's menu has lines like this:
file_menu.add_command(
label = 'New',
command = self.callbacks['file->new', underline 0],
accelerator = 'Ctrl+N'
)
'underline' has nothing to do with look
On 2021-01-06 at 11:18:15 -0800,
Rich Shepard wrote:
> On Wed, 6 Jan 2021, 2qdxy4rzwzuui...@potatochowder.com wrote:
>
> > I'm not a TKinter expert (nor even a current user), but that line that
> > begins with whitespace and "command =" looks suspicious. As far as I can
> > see, Python is correc
On Wed, 6 Jan 2021, 2qdxy4rzwzuui...@potatochowder.com wrote:
I'm not a TKinter expert (nor even a current user), but that line that
begins with whitespace and "command =" looks suspicious. As far as I can
see, Python is correct to call it syntactically erroneous.
Yes, the line above it needed
On 2021-01-06 at 10:32:58 -0800,
Rich Shepard wrote:
> My application's menu has lines like this:
> file_menu.add_command(
> label = 'New',
> command = self.callbacks['file->new', underline 0],
> accelerator = 'Ctrl+N'
> )
>
> Python reports a
On 8/5/2014 7:33 PM, Nicholas Cannon wrote:
I am confused. When I did menu bar.add_cascade why don't I do
filemenu.add_cascade. Is it because I am adding a cascade to the main menubar?
Let us start with a widget, that can 'contain' other widgets (and
possibly other things). We create a child
I am confused. When I did menu bar.add_cascade why don't I do
filemenu.add_cascade. Is it because I am adding a cascade to the main menubar?
--
https://mail.python.org/mailman/listinfo/python-list
On 8/5/2014 6:28 PM, Nicholas Cannon wrote:
Ok so I am on 2.7.8.
What x.y.z version of Python. How did you run it, exactly?
Adding filemenu as a submenu of filemenu leads to infinite loop regress.
On 3.4.1 with tcl/tk 8.6, this does not crash, but it might on an
earlier version of Python an
Ok so I am on 2.7.8.
> What x.y.z version of Python. How did you run it, exactly?
> Adding filemenu as a submenu of filemenu leads to infinite loop regress.
>
> On 3.4.1 with tcl/tk 8.6, this does not crash, but it might on an
>
> earlier version of Python and tcl/tk.
> Since menubar is left e
On 8/5/2014 8:15 AM, Nicholas Cannon wrote:
Ok so the first part of the program(until the start of the menu) worked fine.
It ran and did what I wanted it to do.
What x.y.z version of Python. How did you run it, exactly?
I wanted to then implement a new menu(for practise) and then it crashes
Le 09/06/2010 20:37, rantingrick a écrit :
On Jun 9, 12:20 pm, Dodo wrote:
Le 09/06/2010 18:54, rantingrick a crit :
On Jun 9, 11:26 am, Dodowrote:
Hello,
I trying to make this piece of code work (this is python3)
from tkinter import *
from tkinter.ttk import *
class Window:
On Jun 9, 12:20 pm, Dodo wrote:
> Le 09/06/2010 18:54, rantingrick a crit :
>
>
>
>
>
> > On Jun 9, 11:26 am, Dodo wrote:
> >> Hello,
>
> >> I trying to make this piece of code work (this is python3)
>
> >> from tkinter import *
> >> from tkinter.ttk import *
>
> >> class Window:
> >> def __in
Le 09/06/2010 18:54, rantingrick a écrit :
On Jun 9, 11:26 am, Dodo wrote:
Hello,
I trying to make this piece of code work (this is python3)
from tkinter import *
from tkinter.ttk import *
class Window:
def __init__(self):
self.root = Tk()
self.menu = Menu(self.root)
self.roo
On Jun 9, 11:26 am, Dodo wrote:
Also you are now NOT using 8 space indention unlike your last post --
which i applaud you for. However you've gone to the opposite extreme
with 2 space indention and interlaced it with one space indention, oh
dear!
Please use four space indention as this is the p
On Jun 9, 11:26 am, Dodo wrote:
> Hello,
>
> I trying to make this piece of code work (this is python3)
>
> from tkinter import *
> from tkinter.ttk import *
>
> class Window:
> def __init__(self):
> self.root = Tk()
>
> self.menu = Menu(self.root)
> self.root['menu'] = self.menu
>
>
On Fri, 22 Feb 2008 13:30:06 +0100, <[EMAIL PROTECTED]> wrote:
[snip]
> Sub problems: how to change state of menu item? how to detect changes
> in Text widget?
If you have a reasonably recent tcl/tk version (>= 8.4), you should have a
edit_modified() method on your Text telling you if it has bee
Rob Wolfe wrote:
> But I think that you should read this:
> http://effbot.org/zone/vroom.htm
Rob, may the gods shower you with gold coins!
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] writes:
> Tkinter definitely deserves more respect! I'm making rapid progress
> and it looks good.
>
> But am stuck on this: I want the File/Save state to change from
> disabled to enabled, depending on whether or not there is something to
> save (Text modified). Google returns r
Dave Opstad wrote:
> In article <[EMAIL PROTECTED]>,
> Kevin Walzer <[EMAIL PROTECTED]> wrote:
>
>> I'm having difficulty structuring a Tkinter menu entry. Here is the
>> command in question:
>>
>> self.finkmenu.add_command(label='Update List of Packages',
>> command=self.authorizeCommand(self.
[EMAIL PROTECTED] wrote:
> On Mar 30, 2:32 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote:
>> I'm having difficulty structuring a Tkinter menu entry. Here is the
>> command in question:
>>
>> self.finkmenu.add_command(label='Update List of Packages',
>> command=self.authorizeCommand(self.scanPackages))
On Mar 30, 2:32 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> I'm having difficulty structuring a Tkinter menu entry. Here is the
> command in question:
>
> self.finkmenu.add_command(label='Update List of Packages',
> command=self.authorizeCommand(self.scanPackages))
>
> When I start my program, it
On Mar 30, 2:32 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> I'm having difficulty structuring a Tkinter menu entry. Here is the
> command in question:
>
> self.finkmenu.add_command(label='Update List of Packages',
> command=self.authorizeCommand(self.scanPackages))
>
> When I start my program, it
In article <[EMAIL PROTECTED]>,
Kevin Walzer <[EMAIL PROTECTED]> wrote:
> I'm having difficulty structuring a Tkinter menu entry. Here is the
> command in question:
>
> self.finkmenu.add_command(label='Update List of Packages',
> command=self.authorizeCommand(self.scanPackages))
>
> When I st
> Please tell me is here anything that I should change.
The way you have written it, master _must_ be a Toplevel object. So,
maybe parent is the correct name, but it doesn't really matter.
As a side note, there is no reason for this class to inherit Frame.
Aside from packing and sizing the frame,
>
> the easiest way to do this is to create a new function object for each
> file, and use default argument binding to pass in the right filename:
>
> for file in self.allfiles:
> def callback(fname=file):
> self.showFile(fname, parent)
> self.showfilemenu_bar.add
<[EMAIL PROTECTED]> wrote:
> I'm writing a small GUI program in Python/Tkinter (my first Python
> program). I want to make a menu which lists the names of a number of
> text files that my program uses/generates. When I select one of the
> files from the menu, I would like a new window to open up
Yeah. It works on a Sun and Linux, but not Windows. That stinks. We got a
bunch of 1400x1050 display laptops in and now I have to run around changing
a bunch of programs that looked fine on 1024x768 displays.
Thanks!
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Tk tries to u
Tk tries to use the "native" menu control on Windows (and, I think, MacOS).
One result seems to be that for the application's menu bar you can't change the
font.
Of course, Windows provides a way for users to select a uniform font for
menu bars in all applications, in the Display control panel.
J
Thanks for the reply. I now have radio buttons (with a nice tick!) on my
menu that can be greyed out when disabled. I can also change the background
colour of the individual buttons as you suggest.
What I cannot do is change the background colour of the menu bar itself. The
following code is ac
On Wed, 09 Feb 2005 11:35:40 GMT, John Pote <[EMAIL PROTECTED]>
wrote:
I have a menu bar in a top level window as follows
[snip code]
Q1 Cannot find a way of changing the menu bars background colour. When
colour options are accepted they seem to be ignored. Is this a native
look
and feel chara
On Wed, 09 Feb 2005 11:35:40 GMT, John Pote <[EMAIL PROTECTED]>
wrote:
I have a menu bar in a top level window as follows
[snip code]
Q1 Cannot find a way of changing the menu bars background colour. When
colour options are accepted they seem to be ignored. Is this a native
look
and feel chara
43 matches
Mail list logo