In my previous message I said: "Also this module is **not** available
in tkinter". It should be: "Also this
"module is **now** available in tkinter".
2011/8/22 守株待兔 <1248283...@qq.com>:
> python3.2
> Python 3.2 (r32:88445, Mar 25 2011, 19:28:28)
> [GCC 4.5.2] on linux2
> Type "help", "copyright",
tkMessageBox has been renamed to messagebox in Python 3.x. Also this
module is not available in tkinter. Therefore:
[code]
>>> from tkinter import messagebox
>>> messagebox.showwarning("hello", "world")
[/code]
2011/8/22 守株待兔 <1248283...@qq.com>:
> python3.2
> Python 3.2 (r32:88445, Mar 25 2011,
With lambda your codes will look like this:
[code]
from Tkinter import *
fields = 'Name', 'Job', 'Pay'
def fetch(entries):
for entry in entries:
print 'Input => "%s"' % entry.get() # get text
def makeform(root, fields):
entries = []
for field in fields:
row = Frame(r
I think there is no difference. Both positions seem reasonable to me.
So you can insert the set_focus line at whichever position you wish.
2011/8/17 守株待兔 <1248283...@qq.com>:
> code1
> from Tkinter import *
> root = Tk()
> def callback(event):
>print "i am here"
>
> frame = Frame(root, width=1
The reason why you get no response is the lack of focus when you first
create the frame. Therefore you should set the focus on frame
manually, like this:
[code]
from Tkinter import *
root = Tk()
def callback(event):
print "i am here"
frame = Frame(root, width=100, height=100)
frame.bind("", ca
Check the following out.
code.py
from tkinter import messagebox
from tkinter import *
from tkinter import ttk
class Option:
def quit(master):
if messagebox.askyesno(message='Close window'):
master.quit()
main.py
---
from tkinter import *
from tkin
Hello,
I do not know whether there is an easier way to accomplish what you want,
but maybe you can create a new toplevel window in the middle of the screen,
then make it invisible and position the dialog windows relative to this new
toplevel... Like this: http://paste-it.net/public/q2a5594/
I kno
Hello,
for loop doesn't work, because in a for loop all events will be bound all at
once, and you will only see the effect of the last binding. You need
something that binds events one by one.
If I were you, I would use the next() method of Python iterators:
http://paste-it.net/public/pe0b871/
Hello,
Take a look at this code:
http://paste-it.net/public/l0b490d/
2010/10/9 Wave71
>
> I create and object (text)
> then I want it to wait for about 3 seconds
> then I want it to delete that object
>
> import time
>
> text = w.create_text(x,y, text)
> time.sleep(3)
> w.delete(text)
>
>
> Bu
You can use "current linestart" and "current lineend". For example
http://paste-it.net/public/x8d0f7b/
2010/9/30 Baz79
>
> What arguments should delete() take in order to delete the current line?
>
> Thanks,
>
> Barry
> --
> View this message in context:
> http://old.nabble.com/How-do-I-delete-
Hello,
Until Python's 3.0 version, the name of the Tkinter module was "Tkinter".
Therefore we used to import this module as:
>>> import Tkinter
Starting from Python 3.0, the name of this module is "tkinter". So you
should issue the following command to import the module:
>>> import tkinter
Nor
Hello,
I modified your code to make it work:
http://paste-it.net/public/m46ae5d/
Certainly, to be able to re-write the code, I made some assumptions and
guesses about your original intentions. Just check the code to see if it is
close to what you want.
Firat
2010/9/21 Devred, Emmanuel
> Hel
fonts in my code (under Ubuntu), and they all work.
Good Luck!
Firat
2010/8/24 Michael Lange
> Hello,
>
> Thus spoketh Firat Ozgul
> unto us on Tue, 24 Aug 2010 16:54:30 +0300:
>
> > Hello,
> >
> > It looks like that postscript() function cannot render every fo
:)
>
> Regards
>
> Michael
>
> > 2010/8/24 Cameron Laird
> >
> > > On Tue, Aug 24, 2010 at 11:57:57AM +0300, Firat Ozgul wrote:
> > >.
> > >.
> > >.
> > &g
I tested the original poster's code on Ubuntu Karmic Koala (GNOME). As soon
as the file dialog is closed, the entry widget is ready for typing. So it
seems that this problem is specific to Windows OS.
2010/8/24 Cameron Laird
> On Tue, Aug 24, 2010 at 03:36:56PM +0300, Firat Ozg
onfiguring
TrueType fonts:
http://www.faqs.org/docs/Linux-mini/TT-Debian.html
Firat
2010/8/24 Michael Lange
> Hi Firat,
>
> Thus spoketh Firat Ozgul
> unto us on Tue, 24 Aug 2010 12:51:48 +0300:
>
> > Hello,
> >
> > I found some useful stuff at:
> > h
I could reproduce the error on a Windows XP machine. I will test it on
GNU/Linux (Ubuntu Karmic Koala - GNOME) in the evening.
2010/8/24 Cameron Laird
> On Tue, Aug 24, 2010 at 11:57:57AM +0300, Firat Ozgul wr
Serif Condensed-Bold-R-Normal--*-120-*"
*
2010/8/24 Michael Lange
> Thanks Firat for the reply,
>
> Thus spoketh Firat Ozgul
> unto us on Tue, 24 Aug 2010 09:16:41 +0300:
>
> > Hello,
> >
> > Unfortunately there are not enough documentation about Python-tk
;, "families")
[/code]
Please try this way, and tell me if it solves the problem.
2010/8/24 Michael Lange
> Thanks Firat for the reply,
>
> Thus spoketh Firat Ozgul
> unto us on Tue, 24 Aug 2010 09:16:41 +0300:
>
> > Hello,
> >
> > Unfortunately there
Actually, I can reproduce the error described by the original poster... I am
not exactly sure about the true dynamics of the solution, but after_idle()
method seems to solve the problem in a way. Perhaps, for one reason or the
other, the program cannot return to the main window properly even though
In addition to my previous e-mail, I want to add the following link in which
there are some explanations and an example code for creating postscript.
However the following is only useful if you are into Tcl/Tk:
http://flylib.com/books.php?ln=en&n=3&p=480&c=292&p1=1&c1=1&c2=478&view=2
Firat
2010/
Hello,
Unfortunately there are not enough documentation about Python-tk postscript
manipulation. Information is scattered here and there.
A sample code could be like this:
[0] http://paste-it.net/public/l5a7036/
Some useful discussions on the topic:
[0]
http://www.velocityreviews.com/forums/t326
Hello,
In Tkinter, when you want to create a secondary window you do not have to
implement a whole new class. What you need to do is just create a new
toplevel. Furthermore, never use "globals" within a class.
I made some modifications to your code. You can find the modified version of
your code
rgs):var.set(var.get()+1)root.after(1000, increment)
>>
>>
>> but1=Button(text="click me", command=increment)
>> but1.grid()
>>
>> but without any success.
>>
>> cheers!
>>
>>
>> 2010/8/19 Firat Ozgul
>>
&
[quote]Cameron Laird: "update() is *not* essential: after() provides a
non-threading alternative."[/quote]
I agree. If you would not like to use update(), you can use after() in your
code with pretty much the same functionality:
http://paste-it.net/public/e7ce371/
___
If I am not mistaken you want something like this:
1) http://paste-it.net/public/i2de44d/ (with threads and classes)
2) http://paste-it.net/public/f5e340e/ (without threads and classes)
Note that without threads, we need to use the update() method. However,
without threads you will experience so
My previous code was erroneous. Therefore I edited it.
http://paste-it.net/public/u46e119/
2010/8/12 Chris Chia
> Hi i have the following problem with Python Tkinter.
> I switch to switch the image background (which i used Tkinter.Label with
> image arg to display on the GUI).
>
> How can I do
Hello,
I posted the code in here:
http://paste-it.net/public/y1ba880/
Firat
2010/8/12 Chris Chia
> Hi i have the following problem with Python Tkinter.
> I switch to switch the image background (which i used Tkinter.Label with
> image arg to display on the GUI).
>
> How can I do that? the cal
28 matches
Mail list logo