Re: [Tkinter-discuss] simple scrollbar... not so simple

2010-11-25 Thread Sorin Schwimmer
Mick, you saved me! My test code looks now like this (I hope HTML tags are honoured): from Tkinter import * r=Tk() tx=Text(r,width=6) # hosts the frames and allows scrollbar sb=Scrollbar(r,command=tx.yview) tx['yscrollcommand']=sb.set f=Frame(tx) # hosts my stuff tx.window_create(END,window=f) t

Re: [Tkinter-discuss] simple scrollbar... not so simple

2010-11-24 Thread Sorin Schwimmer
Mick, you're right, Tkinter frames are not scrollable. That's why I'm nesting my frame into a Text widget... and am not getting anywhere :-( SxN ___ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinte

[Tkinter-discuss] simple scrollbar... not so simple

2010-11-23 Thread Sorin Schwimmer
Hi all, I have a list of checkboxes and label/entry pairs which I'd like to have in a scrollable widget. So I built something like this (in this example I put just labels): from Tkinter import * r=Tk() tx=Text(r) # hosts the frames and allows scrollbar sb=Scrollbar(r,command=tx.yview) tx['yscr

Re: [Tkinter-discuss] How to direct a text on Tkinter

2009-08-16 Thread Sorin Schwimmer
I suggest to have a look at tkZinc (www.tkzinc.org). It is a Canvas++, so to speak, and I was able to make small maps of the "how to find us" kind. Some street names were shown horizontally, some vertically; I understand you need something similar. Good luck, SxN ___

Re: [Tkinter-discuss] Passing arguments to command in button.bind

2009-07-29 Thread Sorin Schwimmer
lambda is your friend: optiondict[option].bind("", lambda t='this is a string i want to pass': self.newdestination(t)) HTH SxN __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-ne

Re: [Tkinter-discuss] ttk style dilema

2009-04-27 Thread Sorin Schwimmer
Thanks everyone, SxN __ Reclaim your name @ymail.com or @rocketmail.com. Get your new email address now! Go to http://ca.promos.yahoo.com/jacko/ ___ Tkinter-discuss mailing list Tk

Re: [Tkinter-discuss] Anti-procedural prejudice? (was: ttk style dilema)

2009-04-27 Thread Sorin Schwimmer
>> Next, your suggestions are exactly what I was looking for. The following >> prototype is showing what am I after (ugly, no classes, but take it as a >> prototype): > . > . > . > We're not saying that good Python code must be expressed > with classes, are we?

Re: [Tkinter-discuss] ttk style dilema

2009-04-27 Thread Sorin Schwimmer
Hi Guilherme, First of all, *I thank you* for providing pyttk. Next, your suggestions are exactly what I was looking for. The following prototype is showing what am I after (ugly, no classes, but take it as a prototype): #! /usr/bin/env python # -*- coding: iso-8859-1 -*- import ttk from ttk i

Re: [Tkinter-discuss] ttk style dilema

2009-04-27 Thread Sorin Schwimmer
Hi Mick, Thanks for your reply. It doesn't answer my question though, as your solution is for "classic" Tkinter, while my inquiry is for themed tk. What will be the approach in ttk? Thanks again, SxN __ Do You Yahoo!? Tired of spam? Yahoo! Mail

[Tkinter-discuss] ttk style dilema

2009-04-27 Thread Sorin Schwimmer
Hi All, I installed recently tcl/tk 8.5.6, Python 2.6.2 and pyttk 0.3 on a Linux (Gentoo) machine. I would like to be able to change two things in entries: - the font should be the default, but in italics - selected text in an entry should have white background and gray foreground How can I ac

[Tkinter-discuss] Fancy Toplevels

2007-03-11 Thread Sorin Schwimmer
Hi All, I am trying to accomplish two things: 1. Set window's border colour 2. Set a coloured miniicon I am running on Linux. Can I do these? How? Thanks for your advice Sorin Don't get soaked. Take a quic

[Tkinter-discuss] Who maintains the Wiki?

2007-02-19 Thread Sorin Schwimmer
Hi All, I just noticed at the bottom of http://tkinter.unpythonic.net/wiki/FrontPage a collection of links that don't belong there. Now, I know that there are porn-loving people, but I'm one who thinks that it doesn't belong to this wiki. Does anybody know how to contact the person(s) who mainta

Re: [Tkinter-discuss] Rotated text

2006-12-05 Thread Sorin Schwimmer
I dug over the weekend and found a solution to my problem. If anyone is interested in such a thing, here is an example of rotated text using BLT: #! /usr/bin/python from Tkinter import * import Pmw r=Tk() g=Pmw.Blt.Graph(r) g.axis_configure('x',hide=1) g.axis_configure('y',hide=1) g.marker_cre

[Tkinter-discuss] Rotated text

2006-12-01 Thread Sorin Schwimmer
Does anyone know about a Tkinter extension to allow 90dgr rotated labels (or other text widget)? Thanks, Sorin Want to start your own business? Learn how on Yahoo! Small Business. http://smallbusiness.yahoo

Re: [Tkinter-discuss] How to dettach a Toplevel

2006-12-01 Thread Sorin Schwimmer
> This sounds like you try to start Tk from a child thread ? > I guess that is something one should never do; maybe you could change > this, so Tk runs in the main thread and the job in the child thread. > I hope this helps > Michael No, it doesn't :-( I used the following test code: #! /usr/

Re: [Tkinter-discuss] How to dettach a Toplevel

2006-11-30 Thread Sorin Schwimmer
After hitting "send" with John's answer I saw Matthias question. So here is my next answer: Yes, it is a daemon "a la carte". It forks, os.setsid, forks, redirects sys.stdin and sys.stdout to /dev/null. The code resides in /etc/init.d and dependencies are taken care of. But I don't think this s

Re: [Tkinter-discuss] How to dettach a Toplevel

2006-11-30 Thread Sorin Schwimmer
Mainloop is included. Basically, the daemon starts a thread that waits for KDE, and does its job in the main thread. The function that is started looks like this: def inittk(): global rtk while True: sleep(60) try: rtk=Tk(screenName=':0.0') except: continue break

Re: [Tkinter-discuss] How to dettach a Toplevel

2006-11-29 Thread Sorin Schwimmer
Hi Michael, While the two toplevel solution will work nicely, I'm not sure how would I close the main application (at one point I want to be able to do so). As for the other suggestion, that was my first approach, but it doesn't work. I don't know why, and sometime I'll have to find out, as I'l

Re: [Tkinter-discuss] How to dettach a Toplevel

2006-11-28 Thread Sorin Schwimmer
Hi Michael, I see your point, but this is not what I am looking for. What I'm trying to achieve goes on the following lines: the user has a GUI and works. A daemon (I'm on Linux) receives a message for the user, so it pops-up a little notification symbol (there is actualy a bit more inter-proce

[Tkinter-discuss] A small fix for NoteBook in Tix

2006-11-28 Thread Sorin Schwimmer
Problem: >>> from Tix import * >>> root=Tk() >>> nb=NoteBook(root) >>> nb.add('pg_1', label='pg 1') >>> nb.pages() Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.4/lib-tk/Tix.py", line 1160, in pages ret.append(self.subwidget(x)) File "/usr/local/l

Re: [Tkinter-discuss] Stumped

2006-11-28 Thread Sorin Schwimmer
I never tried Bob's Greschke idea of using update() in a callback, because of this reason: http://www.pythonware.com/library/tkinter/introduction/x9374-event-processing.htm Sorin __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam pro

Re: [Tkinter-discuss] Stumped

2006-11-28 Thread Sorin Schwimmer
Add in your functions, first statement after def global CancelNow This way everybody refers *the same* flag. I would normally move your second-last statement (CancelNow = False) just below imports. De-stumped? Sorin ___

[Tkinter-discuss] How to dettach a Toplevel

2006-11-28 Thread Sorin Schwimmer
Hi, If I have: from Tkinter import * root=Tk() tl=Toplevel() root.mainloop() and then close the root window, it will take tl with it. Is there a way to keep tl alive after root dies? Thanks, Sorin Yaho

Re: [Tkinter-discuss] moving from pack to grid

2006-11-27 Thread Sorin Schwimmer
> self.label.grid(row=5, column=2, column=0) Why do you have "column" twice? Grid will always compact your GUI: if you grid something on row 3, and rows 0..2 are empty, everything is pushed up. If you add a widget at row 2, row three goes down one level to make room for row two. Similarly, for

Re: [Tkinter-discuss] Windows beautification

2006-11-23 Thread Sorin Schwimmer
Hello again, Thanks for replys. I should have pointed out that I'm on Linux, with KDE. > On linux (with IceWM) the iconwindow is not visible, but at least the Toplevel > disappears and Tk does not complain. Maybe it works on windows. > > Michael Same happens to me. I started exploring the Label

Re: [Tkinter-discuss] Windows beautification

2006-11-22 Thread Sorin Schwimmer
> I think you need a Toplevel() window instead of a Label. > Michael I'm not sure I understand. Can you illustrate with an example? Thanks, Sorin Do you Yahoo!? Everyone is raving about the all-new Yahoo!

[Tkinter-discuss] Windows beautification

2006-11-22 Thread Sorin Schwimmer
Hi All, 1. I'd like to be able to put an icon on the titlebar. I read about using iconwindow together with a Label, but how? My code: from Tkinter import * import Image,ImageTk root=Tk() im=ImageTk.PhotoImage(Image.open("mcut16.png")) # a 16x16 image lb=Label(root,image=im) root.iconwindow(lb)

[Tkinter-discuss] Tkinter question

2006-10-24 Thread Sorin Schwimmer
Thanks for everybody's advice, on both forums (tkinter-discuss & python-list).I end up using Fredrik's Lundh solution, since, in my project, multiple buttons are using the same callback, and their creation is controlled by the interaction with the user.Thanks again,Sorin

[Tkinter-discuss] Tkinter question

2006-10-23 Thread Sorin Schwimmer
Hi All,Is it possible to have a widget id while it is created?Something like this:Button(root, text='...', command= lambda v=: fn(v)).grid()and then the function:def fn(v):  v['bg']='BLUE' # or maybe nametowidget(v)['bg']='BLUE'Thanks,Sorin___ Tkinter-dis

[Tkinter-discuss] bwidget combobox with images - need help

2006-10-19 Thread Sorin Schwimmer
Hi,I am trying to build a combobox that has some small icons beside the textual options (kind of like the favicons in bookmarks in web browsers). I found that bwidget has such a think, but I'm not sure how to use it.Does anybody has an example?Thanks,Sorin___

[Tkinter-discuss] Fw: Tkinter's createfilehandler - attempt to run parallel threads

2006-10-12 Thread Sorin Schwimmer
This question was posted on python-list@python.org, but found no answer there. Maybe here I'll be lucky...Thanks,Sorin- Forwarded Message From: Sorin Schwimmer <[EMAIL PROTECTED]>To: python-list@python.orgSent: Thursday, July 27, 2006 1:20:21 PMSubject: Tkinter's c

Re: [Tkinter-discuss] Textbox in undecorated window (was - no subject -)

2006-10-07 Thread Sorin Schwimmer
Hi again,Thanks Bobby, thanks Mathias. Sorry for forgeting to type the subject.Right now I have the piece of code working with the overrideredirect commented out. It's not the way I wanted, but it's working. Setting the master explicitely to root doesn't help.My configuration is Gentoo (kernel 2.6.

[Tkinter-discuss] (no subject)

2006-10-06 Thread Sorin Schwimmer
Hi All,I am trying to use a textbox in an undecorated window. It works under Windows, it fails under Linux. Here is a test code:from Tkinter import *root=Tk()root['bg']='' # transparent backgroundroot.overrideredirect(1) # get rid of borderroot.geometry("+80+120") # place on screenroot.focus_set()