Re: main window in tkinter app

2005-07-18 Thread Eric Brunel
On Mon, 18 Jul 2005 16:57:51 GMT, William Gill <[EMAIL PROTECTED]> wrote: > A short while ago someone posted that(unlike the examples) you should > use Tk as the base for your main window in tkinter apps, not Frame. Thus : > >class MyMain(Frame): >def __init__(self, master): >

Re: win32ui CreatePrintDialog

2005-07-18 Thread Eric Brunel
On Fri, 15 Jul 2005 18:08:35 -0400, Chris Lambacher <[EMAIL PROTECTED]> wrote: > Hi, > > This question has come up a few times on the list with no one giving a public > answer. How do you use CreatePrintDialog from win32ui? > > About a year ago someone posted that: > dlg = win32ui.CreatePrintDial

Re: Tkinter grid layout

2005-07-07 Thread Eric Brunel
On Wed, 06 Jul 2005 16:32:42 GMT, William Gill <[EMAIL PROTECTED]> wrote: > Excuse me for intruding, but I followed examples and ended up with a > similar architecture: > > from Tkinter import * > class MyMain(Frame): > def __init__(self, master): > self.root = mast

Re: Tkinter grid layout

2005-07-06 Thread Eric Brunel
On Wed, 06 Jul 2005 11:44:55 +0100, Richard Lewis <[EMAIL PROTECTED]> wrote: > Hi there, > > I've got a tree control in Tkinter (using the ESRF Tree module) but I > can't get it to layout how I want it. > > I'd like to have it so that it streches north/south (anchored to the top > and bottom), is

Re: Tkinter Checkbutton initialization problem

2005-07-04 Thread Eric Brunel
On 03 Jul 2005 02:32:21 -0700, Paul Rubin wrote: > Python 2.4, Windows XP. If I say: > > f = Frame() > f.grid() > v = IntVar() > c = Checkbutton(f, text='hi there', variable=v) > c.grid() > f.mainloop() > > then the checkbutton should initially d

Re: custom Tkinter ListBox selectMode

2005-07-03 Thread Eric Brunel
On Fri, 1 Jul 2005 20:19:20 -0400, Ron Provost <[EMAIL PROTECTED]> wrote: > Hello, > > I've written a simple GUI which contains a listbox to hold some information. > I've found that the click-selection schemes provided by Tkinter are > insufficient for my needs. Essentiall I need to impletement a

Re: Python 2.1 / 2.3: xreadlines not working with codecs.open

2005-06-28 Thread Eric Brunel
On Thu, 23 Jun 2005 14:23:34 +0200, Eric Brunel <[EMAIL PROTECTED]> wrote: > Hi all, > > I just found a problem in the xreadlines method/module when used with > codecs.open: the codec specified in the open does not seem to be taken into > account by xreadlines which also

Re: tkinter radiobutton

2005-06-26 Thread Eric Brunel
On Sat, 25 Jun 2005 19:34:50 GMT, William Gill <[EMAIL PROTECTED]> wrote: > I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep > references to them in a 2 dimensional list ( rBtns[r][c] ). It works > fine, and I can even make it so only one button per column can be > selected, by

Re: Frame widget (title and geometry)

2005-06-24 Thread Eric Brunel
On Fri, 24 Jun 2005 10:21:01 -0400, Shankar Iyer ([EMAIL PROTECTED]) <[EMAIL PROTECTED]> wrote: > Hi, > > I am still new to Python and Tkinter, so I apologize in advance if I do not > word my question optimally. I am trying to use a frame widget as the parent > for other widgets. There is a cla

Python 2.1 / 2.3: xreadlines not working with codecs.open

2005-06-23 Thread Eric Brunel
Hi all, I just found a problem in the xreadlines method/module when used with codecs.open: the codec specified in the open does not seem to be taken into account by xreadlines which also returns byte-strings instead of unicode strings. For example, if a file foo.txt contains some text encoded

Re: Fast text display?

2005-06-08 Thread Eric Brunel
On Thu, 09 Jun 2005 02:22:08 +0200, Riccardo Galli <[EMAIL PROTECTED]> wrote: > Using tkinter doesn't need downloading and installing only in Windows. > In *nix is not so common to have tcl/tk installed (and probably in Mac too) > > GUI cross platform need external support, in a OS or in another.

Re: Tkinter slowes down

2005-05-30 Thread Eric Brunel
On Sat, 28 May 2005 18:21:46 +0200, pavel.kosina <[EMAIL PROTECTED]> wrote: > Fredrik Lundh napsal(a): >> when you add an item to the canvas, it's part of the canvas >> until you remove it. if performance drops, it's usually because >> you keep adding new items without removing the old ones. >> >

Re: tkinter text width

2005-04-29 Thread Eric Brunel
On Thu, 28 Apr 2005 16:14:02 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: On Thu, 28 Apr 2005 10:36:18 +0200, "Eric Brunel" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: This is the case on all platforms, but far more sensible on Windows: Windows attem

Re: tkinter text width

2005-04-28 Thread Eric Brunel
On Wed, 27 Apr 2005 12:52:21 -0700, James Stroud <[EMAIL PROTECTED]> wrote: [snip] How might I query the size of a fixed-width font in pixles? It appears that the width of the font in points does not correlate with its width in pixels based on some simple expriments I have done. This is the case on

Re: tkinter text width

2005-04-27 Thread Eric Brunel
On Tue, 26 Apr 2005 17:01:46 -0700, James Stroud <[EMAIL PROTECTED]> wrote: Hello All, I would like for a tkinter text widget to be aware of how big the frame that contains it is, then I would like for it to reset its width to the appropriate number of characters when this frame changes size. Errr.

Re: Getting the sender widget's name in function (Tkinter)

2005-04-27 Thread Eric Brunel
On 26 Apr 2005 13:37:29 -0700, infidel <[EMAIL PROTECTED]> wrote: from Tkinter import Tk, Button def say_hello(event): print 'hello!' print event.widget['text'] root = Tk() button1 = Button(root, text='Button 1') button1.bind('', say_hello) button1.pack() button2 = Button(root, text='Button

Re: New to Tkinter...

2005-04-19 Thread Eric Brunel
On Tue, 19 Apr 2005 09:35:03 -0400, Peter G Carswell <[EMAIL PROTECTED]> wrote: Good Morning. I am new to Tkinter. I have been testing the installation of Tkinter through the python web site. The first two test steps give no errors, 'import _tkinter' and 'import Tkinter'. However, the third step, '

Re: Tkinter Event Types

2005-04-19 Thread Eric Brunel
On 18 Apr 2005 13:48:50 -0700, codecraig <[EMAIL PROTECTED]> wrote: Hi, When I do something like. s = Scale(master) s.bind("", callback) def callback(self, event): print event.type I see "7" printed out. Where are these constants defined for various event types? Basically i want to do somet

Re: Simple Python + Tk text editor

2005-04-14 Thread Eric Brunel
On Thu, 14 Apr 2005 06:41:26 +0100, Jonathan Fine <[EMAIL PROTECTED]> wrote: [snip] And for my project (integration of Python and TeX) there is most unlikely to be a better one. Do you know the (apparently dead) project named e:doc? You can find it here: http://members.nextra.at/hfbuch/edoc/ It's a

Re: Things you shouldn't do

2005-03-30 Thread Eric Brunel
On Wed, 30 Mar 2005 07:02:57 GMT, Andrew Dalke <[EMAIL PROTECTED]> wrote: Steve wrote: [an anecdote on distinguishing l1 and 11] What are some of other people's favourite tips for avoiding bugs in the first place, as opposed to finding them once you know they are there? There's a good book on this

Re: problem with tkinter

2005-03-30 Thread Eric Brunel
On Tue, 29 Mar 2005 22:32:59 +0200, Pierre Quentel <[EMAIL PROTECTED]> wrote: Instead of indexing self.lab by strings, you can index them by the attributes themselves : self.lab[self.i], and change line 23 into for var in (self.s, self,i) I really think this is asking for trouble: I suppose t

Re: tkinter destroy()

2005-03-29 Thread Eric Brunel
On Tue, 29 Mar 2005 10:37:10 GMT, max(01)* <[EMAIL PROTECTED]> wrote: hi people. when i create a widget, such as a toplevel window, and then i destroy it, how can i test that it has been destroyed? the problem is that even after it has been destroyed, the instance still exists and has a tkinter nam

Re: How to ensure Maximize button shows in Linux/Unix (Tkinter)

2005-03-29 Thread Eric Brunel
On 26 Mar 2005 08:19:07 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: Diez, Thanks for the quick reply. I am running this under KDE. I actually haven't tried doing so under any other wm for the moment. Any ideas how to get it to show in KDE? This is a tk bug; see: http://sourceforge.net/tracker/i

Re: scrollbar dependencies

2005-03-24 Thread Eric Brunel
On 24 Mar 2005 03:24:34 -0800, Marion <[EMAIL PROTECTED]> wrote: Next mystery : a picture drawn in the canvas c1 is scrollable. a picture-containing canvas "grided" in the canvas c1 is not. so why ??? Marion --- [snip] #---

Re: (Tkinter) Adding delay to PopUpMsg

2005-03-18 Thread Eric Brunel
On 17 Mar 2005 23:40:20 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: I am working on making something called a PopMsg widget which is actually identical to a Balloon widget from Pmw. Here is the code: ---code--- from Tkinter import * import time class PopMsg: def showmsg(self, event):

Re: Tkinter Bitmap Newbie question

2005-03-15 Thread Eric Brunel
On Tue, 15 Mar 2005 00:00:57 GMT, Neil Hodgson <[EMAIL PROTECTED]> wrote: Wim Goffin: But just to make sure I'm on the right track, - Is XBM the best way to for bitmaps? The ones I saw so far are all black and white. Do they also exist in color? XPM is the version of XBM with colour. - Is XBM al

Re: Setting default option values for Tkinter widgets

2005-03-03 Thread Eric Brunel
On 3 Mar 2005 03:02:48 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: There are certain options for Tkinter widgets that have default values that I don't much care for (borderwidth, font come to mind) and continuously change when I'm building interfaces. With a bit of tweaking I have been able to

Re: scrollbar dependencies

2005-03-03 Thread Eric Brunel
On 3 Mar 2005 02:38:59 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: Pardon a question I should already know the answer to, but what are the *args in the: def xscrollboth(*args): c1.xview(*args) c2.xview(*args) Thanks, Harlin If your question is about the syntax, it's just the way of passin

Re: scrollbar dependencies

2005-03-03 Thread Eric Brunel
On 3 Mar 2005 01:06:48 -0800, Marion <[EMAIL PROTECTED]> wrote: Hello. I am using Tkinter and Pmw. I would like to build 2 canvases/frames that are scrollable together horizontally, and independently vertically (so, the vertical scrollbars should not be moved by the horizontal one). So I built a Pm

Re: Polling selections from a listbox (Tkinter)

2005-02-28 Thread Eric Brunel
On 26 Feb 2005 03:48:16 -0800, Harlin Seritt <[EMAIL PROTECTED]> wrote: [snip] Obviously when this starts up this is going to show selection #0 inside the label box. How do I make sure that whatever is arbitrarily selected ends up in the label box as this gui runs? I tried doing a bind: self.listbo

Re: Fonts

2005-02-28 Thread Eric Brunel
On Fri, 25 Feb 2005 11:00:41 -0600, phil <[EMAIL PROTECTED]> wrote: I'm cpmpletely lost on fonts. I'm using Tkinter I do medarial = '-*-Arial-Bold-*-*--24-*-*-*-ISO8859-1" or Courier or Fixed in various sizes. Works great on my RH 7.2 But a small embedded system Im working on, nothing seems to work

Re: Mixing Txinter and Pygame

2005-02-23 Thread Eric Brunel
On Wed, 23 Feb 2005 10:23:09 +1300, Tim Knauf <[EMAIL PROTECTED]> wrote: [snip] (When I'm starting on a language feature, though, I usually find I learn a lot more from worked examples than from straight command information. You may be interested in Tkinter best kept secret: the example scripts in

Re: 'modal dialogs' with Tkinter

2005-02-22 Thread Eric Brunel
l" or whatever buttons you want to use should then call dlg.destroy(). This will terminate the wait_window call and continue the execution of the code after it. HTH - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: Mixing Txinter and Pygame

2005-02-22 Thread Eric Brunel
p://www.tcl.tk/man/tcl8.4/TkCmd/contents.htm It unfortunately requires to know how to convert the tcl/tk syntax to Python/Tkinter syntax, but it is actually quite easy (mainly read "option=value" when the tcl/tk documentation says "-option value") HTH - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: Hello File.py

2005-02-18 Thread Eric Brunel
t. Feel free to note any horrors you see. Just one little thing: if you declare: def MenuOpen(parent): ... you'd better call it via: MenuOpen(root) and not: MenuOpen(parent=root) The 'parent=' stuff is unnecessary and may be confusing, since this syntax is often used only when you declare a function with keyword parameters like: def f(arg, **kwdParams): ... HTH - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: Pmw.Balloon under Windows

2005-02-17 Thread Eric Brunel
since there is no "real" window manager, but from the tk/Tkinter point of view, the result is the same: you can't "fake" a window manager event using event_generate. BTW, what are the versions of Python, tk and Pmw you're using? HTH a little... - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter option_add for menu radiobutton

2005-02-14 Thread Eric Brunel
black...the x.add_radiobutton() ones. Root.option_add("*Menu.Radiobutton*selectColor", "black")...nope Root.option_add("*Menu*selectColor", "black")...no change Strange... The last one works for me (as it should - see http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm

Re: tkinter menu bar problem

2005-02-09 Thread Eric Brunel
ms with a check-mark, use the add_checkbutton or add_radiobutton methods on the parent menu. Their use is similar to the Checkbutton and Radiobutton classes. See [1] for all available options. [1] http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter menu bar problem

2005-02-09 Thread Eric Brunel
ms with a check-mark, use the add_checkbutton or add_radiobutton methods on the parent menu. Their use is similar to the Checkbutton and Radiobutton classes. See [1] for all available options. [1] http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm - Eric Brunel - -- http://mail.python.org/mailman/listinfo/python-list

Re: PyChecker messages

2005-01-11 Thread Eric Brunel
Silencer(signal, dummy): ... the warning will not be triggered. BTW, if your signal handler is just here to catch Ctrl-C, you'd better do a try/except on KeyboardInterrupt... HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter Puzzler

2005-01-07 Thread Eric Brunel
o the last command in the loop. To do what you want, change your code to: for entry in (...): UI.ShortBtn.menu.add_command( label=entry[0], command=lambda func=entry[1]: func(None) ) This way, the value for the func parameter is evaluated when the function is defined and not when

Re: Tkinter zoom box = maximize/unmaximize box/button

2005-01-03 Thread Eric Brunel
. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter zoom box

2005-01-03 Thread Eric Brunel
ot;regular" Tkinter widgets, so it must be built with some other one... Which one is it? A button, a menubutton, or what else? If you had some (simple) code showing the problem, that would also help a lot to understand what's going on... -- - Eric Brunel - PragmaDev : Real Time Sof

Re: cosmetic Tkinter question

2005-01-03 Thread Eric Brunel
hy do you use frames? If you have only check-buttons in them, you do not need them: from Tkinter import * root = Tk() for i in range(0, 101, 20): b = Checkbutton(root, text='Option %s' % i) b.pack(side=TOP, anchor=W) root.mainloop() HTH -- - Eric Brunel - PragmaDev : Real Time Sof

Re: Multithreading tkinter question

2004-12-17 Thread Eric Brunel
just goes out of the mainloop; it doesn't destroy the widgets. To do that, you have to add an explicit root.destroy() after root.mainloop() -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs: wxPython vs. Tkinter (and others)

2004-12-13 Thread Eric Brunel
works quite smoothly. Can you describe what happens to you exactly? -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: spawn or fork

2004-12-08 Thread Eric Brunel
this instead of processes. See http://docs.python.org/lib/module-threading.html HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: spawn or fork

2004-12-08 Thread Eric Brunel
on Unices. What are you trying to do exactly? If you provide more explanations, we may provide a better help than the simplistic one above. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: simple GUI question

2004-12-08 Thread Eric Brunel
e for the dialogs too...) So if you really want to do that, the simplest way is definetely to avoid using the tkMessageBox module and to design your own dialogs. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie alert !

2004-12-03 Thread Eric Brunel
and as named parameters in the following ones? IMHO, since the parameters are positional in the function definition, you'd better pass them as such in the calls, i.e: rings(41, 0, -22, 'black') (Et sinon, il existe un newsgroup Python francophone (fr.comp.lang.python) sur le

Re: Python 2.4 and Tkinter

2004-12-03 Thread Eric Brunel
phase, but then you have to put it in $LD_LIBRARY_PATH to be able to import the module. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 and Tkinter

2004-12-02 Thread Eric Brunel
ded to Python 2.4, I assume you had a working installation of a previous Python version. So the tcl/tk libraries and header files must be there somewhere. Did you look at your Modules/Setup for the older Python? If Tkinter was working with this version, the setup for the _tkinter module should

Re: Problem with tkinter mainloop

2004-11-30 Thread Eric Brunel
ating the problem you have instead of just extracting a few lines of your whole code. This will help people who are willing to help to understand exactly what is going on. HTH -- - Eric Brunel - PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3