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
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
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
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
___
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
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
>> 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?
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
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
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
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
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
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
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
> 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/
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
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
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
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
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
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
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
___
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
> 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
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
> 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!
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)
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
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
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___
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
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.
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()
33 matches
Mail list logo