Russell Owen | 15 May 20:38 2015

problems with Aqua Tcl/Tk core_8_5_branch 2015-04-28

I built Tcl/Tk core_8_5_branch from the 2015-04-28 commit (in the git 
mirror) on OS X 10.9 with MACOS_X_DEPLOYMENT_TARGET=10.6. Visually the 
results are not as nice as code using the 2015-03-24 commit. It seems 
that many widgets, including labels and texts, take up far more room 
than they used to, with the extra room used for unnecessary whitespace. 
The results is far more different from Unix than it used to be.

One improvement is that button text is now displayed with some padding, 
making them much more readable, and more like unix (in a good way, since 
it is easier to write cross-platform code; I had been adding padding on 
OS X). But it seems that too many other controls got the same treatment, 
even if they didn't need it.

Also, both versions of Tcl/Tk have a bug whereby windows are often 
impossible to close. Clicking the close control and typing cmd-W both do 
nothing. Fortunately they can still be minimized, but it's disturbing 
not to be able to close them. Unfortunately this is intermittent, though 
common, making it hard to present a small example. Has anyone else seen 
this?

-- Russell

P.S. binaries are here:
<http://www.astro.washington.edu/users/rowen/python/>
jevan | 18 Mar 02:49 2015
Picon

Is there a way to scroll Tkinter.Text widget by pixel instead of see() (which scrolls by line)?

 

When I type in the Text widget the text lines wrap toward the bottom of the page, the caret reaches the bottom of the Text widget. When I hit return, the caret dissapears out of view. When I type a character, the view finally scrolls up one line allowing me to see the character just typed.

 

See doesn't seem to want to show this next line always, so I can't see. Is there a way scroll the Text widget by pixel, so I can get pixel perfect scrolling?  And/or how do I get the line that get the carriage return to allways bee seen on a enter?

 

FYI: I am breaking each character because I have to custom process each character because the editor has several custom formating things that must occur. So the Enter is actually put in with Text.insert(), not after I have return 'break' in from the keypress event. Could this be something to do with it?



---
Alle Postfächer an einem Ort. Jetzt wechseln und E-Mail-Adresse mitnehmen! Rundum glücklich mit freenetMail
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss
Vasilis Vlachoudis | 9 Mar 16:01 2015
Picon
Picon

Persistent Listbox selection

Dear all,

how can I keep the listbox selection persistent when user selects something in the entry?
In the following example, the rows 0 to 10 are selected in the listbox
If you click and select something in the entry box the selection is lost
Is there an option to avoid this behaviour?

Best Regards
Vasilis

from Tkinter import *
tk = Tk()

listbox = Listbox(tk, selectmode=EXTENDED, exportselection=True)
listbox.pack(fill=BOTH, expand=YES)
for i in range(100): listbox.insert(END,"line %d"%(i))
listbox.selection_set(0,10)

entry = Entry(tk)
entry.pack(side=BOTTOM, fill=X)
entry.insert(0,"Hello world")
tk.mainloop()
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss
kamal_17 | 24 Feb 15:38 2015
Picon

Redirecting command prompt to a gui realtime

Hi,

I want to redirect output of a script into a gui window in realtime.

Please share some code snippet where u have encountered similar issue.

Thanks,
Kamlendra

--
View this message in context: http://python.6.x6.nabble.com/Redirecting-command-prompt-to-a-gui-realtime-tp5087377.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.
Shondra Siskin | 4 Feb 18:13 2015

corret sa

Hi,

---------------------------------------------------------------------
CORRET SA
Goutte Vignole 69490 St Forgeux
Forgeux
FRANCE
+33 474 18 13 46
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss
Paul Malherbe | 17 Feb 16:41 2015
Picon

Tkinter grid_info()

Please could someone tell me why this is not working?

from Tkinter import *

root = Tk()
e = Entry(root)
e.grid(column=0, row=0)
info = e.grid_info()
print "row:", info["row"], "column:", info["column"]
root.mainloop()

Running this displays the following error:

Traceback (most recent call last):
  File "test.py", line 6, in <module>
    grid_info = e.grid_info()
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2000, in grid_info
    self.tk.call('grid', 'info', self._w))
TypeError: coercing to Unicode: need string or buffer, _tkinter.Tcl_Obj
found
Raphaël SEBAN | 2 Feb 12:39 2015
Picon

Re: Tkinter-discuss Digest, Vol 131, Issue 1

Great stuff, Kevin!

Thanks a lot!

Regards.

Le 02/02/2015 12:00, tkinter-discuss-request <at> python.org a écrit :
> Message: 2
> Date: Sun, 01 Feb 2015 11:44:07 -0500
> From: Kevin  Walzer <kw <at> codebykevin.com>
> To: tkinter-discuss <at> python.org
> Subject: Re: [Tkinter-discuss] Weird bug in input widgets? (Michael
> 	Lange)
> Message-ID: <54CE57D7.7070802 <at> codebykevin.com>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> On 2/1/15 9:13 AM, Rapha?l SEBAN wrote:
>> I don't know if there is a bugtracker for Tkinter somewhere.
>> I don't even know if Tkinter is still in development, in fact.
>>
>> Is it?
> Tkinter is just a wrapper around Tk. Here is the place to report Tk bugs:
>
> http://core.tcl.tk/tk/reportlist
>
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss
Raphaël SEBAN | 1 Feb 15:13 2015
Picon

Re: Weird bug in input widgets? (Michael Lange)

Hi Michael,

Thank you for your reply, but I'm on a PC / Linux Ubuntu 14.10 with 
Tkinter/Tk version 8.6 for Python3, standard installation, no specific 
tuning.

I'm working this way to fit as much as possible with customers' machines 
who'd use my apps, generally without making any changes to their 
platform pre-installed packages.

I'm not looking for a bug fix on my own, I'd like to acknowledge 
Tkinter's dev team that this bug exists, hoping that in some late days 
it will be fixed everywhere for everybody. :)

I thought tkinter-discuss was the best place for this.
I don't know if there is a bugtracker for Tkinter somewhere.
I don't even know if Tkinter is still in development, in fact.

Is it?

Regards.

Le 31/01/2015 12:00, tkinter-discuss-request <at> python.org a écrit :
> Send Tkinter-discuss mailing list submissions to
> 	tkinter-discuss <at> python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://mail.python.org/mailman/listinfo/tkinter-discuss
> or, via email, send a message with subject or body 'help' to
> 	tkinter-discuss-request <at> python.org
>
> You can reach the person managing the list at
> 	tkinter-discuss-owner <at> python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tkinter-discuss digest..."
>
>
> Today's Topics:
>
>     1. Weird bug in input widgets? (Rapha?l SEBAN)
>     2. Re: Weird bug in input widgets? (Michael Lange)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 31 Jan 2015 09:20:06 +0100
> From: Rapha?l SEBAN <motus <at> laposte.net>
> To: tkinter-discuss <at> python.org
> Subject: [Tkinter-discuss] Weird bug in input widgets?
> Message-ID: <54CC9036.5060705 <at> laposte.net>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi all,
>
> While working on my latest software (tkScenarist on GitHub), I
> encountered a really weird issue: once cleared, input widgets such as
> Text, Entry, ttk.Entry do *NOT* accept composite-accented letters
> (french ?, ?, etc) any more.
>
> So, to get sure, I made the following test code:
>
> [CODE]
> #!/usr/bin/env python3
> # -*- coding: utf-8 -*-
>
> from tkinter import *
>
> def clear_all (event=None):
>       # clear stringvars
>       for svar in cvars:
>           svar.set("")
>       # end for
>       # clear text widgets
>       for wtext in texts:
>           wtext.delete("1.0", END)
>       # end for
> # end def
>
> def test (nb_of_widgets):
>       global root, cvars, texts
>       root = Tk()
>       root.title("test #{}".format(nb_of_widgets))
>       cvars = list()
>       for n in range(nb_of_widgets):
>           svar = StringVar()
>           cvars.append(svar)
>           Entry(root, textvariable=svar).pack()
>       # end for
>       texts = list()
>       for n in range(nb_of_widgets):
>           wtext = Text(root, height=2, width=20)
>           wtext.pack()
>           texts.append(wtext)
>       # end for
>       Button(root, text="Clear all", command=clear_all).pack(side=LEFT)
>       Button(root, text="Quit", command=root.destroy).pack(side=RIGHT)
>       # events main loop
>       root.mainloop()
> # end def
>
> if __name__ == "__main__":
>       # launch test series
>       for n in range(1, 4):
>           test(n)
>       # end for
> # end if
> [/CODE]
>
> Detailed description of the issue:
>
> * French keyboards are arranged in such a way that you must compose
> accented letters as ? (e circumflex) or ? (e diaeresis) by pressing
> first the '^' key and then the letter to compose with (e.g. a, e, i, o,
> u, y) in order to get the final composite-accented letter (?, ?, ?, ?,
> and so on);
>
> * when you launch the test script (cited above) and then type, let's
> say, the e circumflex letter (?) into the Entry widget and into the Text
> widget, respectively:
>
> 	* the first time, you'll get the right letters inserted into the input
> widgets;
> 	* then click on 'Clear all' button and enter once again the same
> composite-accented letter into *ALL* the input widgets;
> 	* secund time, only the last pack()-ed input widget will get the right
> input, all other widgets will show unaccented letters;
>
> * the test script tries with 1 Entry and 1 Text input widgets, then with
> 2 input widgets and finally with 3 input widgets;
>
> * each time you get the same issue: only the last pack()-ed input widget
> shows the right input letter, all the rest showing unaccented letters.
>
> This issue is quite embarrassing for me as my latest software manages
> with movie scenario scriptwriting, which *MUST* be written with correct
> accents in French, otherwise all the purpose of the software would collapse.
>
> Is this a known issue?
>
> Thank you for your expert advice.
>
> Regards.
>
> Rapha?l SEBAN alias tarball69.
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 31 Jan 2015 10:29:35 +0100
> From: Michael Lange <klappnase <at> web.de>
> To: tkinter-discuss <at> python.org
> Subject: Re: [Tkinter-discuss] Weird bug in input widgets?
> Message-ID: <20150131102935.7159e8d2bae539572639eb3d <at> web.de>
> Content-Type: text/plain; charset=UTF-8
>
> Hi Rapha?l,
>
> I cannot reproduce this behavior here (debian wheezy, Tk-8.5.11), however
> I could only test it with a german keyboard layout with X-Composite key or
> with dead keys temporarily enabled in xfce. I don't think that should
> matter, though, here everything seems to work fine.
>
> I can only guess, but it sounds to me like a platform- and/or Tk-version
> specific issue. If you are running OS X and a recent version of Tk it
> might or might not have something to do with the bug described here:
>      http://sourceforge.net/p/tktoolkit/bugs/2722/
> resp. with the fix that was supplied for that bug. That is is just a shot
> in the dark of course.
>
> Regards
>
> Michael
>
>
> On Sat, 31 Jan 2015 09:20:06 +0100
> Rapha?l SEBAN <motus <at> laposte.net> wrote:
>
>> (snipped reply)
>> _______________________________________________
>> Tkinter-discuss mailing list
>> Tkinter-discuss <at> python.org
>> https://mail.python.org/mailman/listinfo/tkinter-discuss
> .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
>
> Compassion -- that's the one things no machine ever had.  Maybe it's
> the one thing that keeps men ahead of them.
> 		-- McCoy, "The Ultimate Computer", stardate 4731.3
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss <at> python.org
> https://mail.python.org/mailman/listinfo/tkinter-discuss
>
>
> ------------------------------
>
> End of Tkinter-discuss Digest, Vol 130, Issue 8
> ***********************************************
>
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss
Raphaël SEBAN | 31 Jan 09:20 2015
Picon

Weird bug in input widgets?

Hi all,

While working on my latest software (tkScenarist on GitHub), I 
encountered a really weird issue: once cleared, input widgets such as 
Text, Entry, ttk.Entry do *NOT* accept composite-accented letters 
(french ê, ë, etc) any more.

So, to get sure, I made the following test code:

[CODE]
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from tkinter import *

def clear_all (event=None):
     # clear stringvars
     for svar in cvars:
         svar.set("")
     # end for
     # clear text widgets
     for wtext in texts:
         wtext.delete("1.0", END)
     # end for
# end def

def test (nb_of_widgets):
     global root, cvars, texts
     root = Tk()
     root.title("test #{}".format(nb_of_widgets))
     cvars = list()
     for n in range(nb_of_widgets):
         svar = StringVar()
         cvars.append(svar)
         Entry(root, textvariable=svar).pack()
     # end for
     texts = list()
     for n in range(nb_of_widgets):
         wtext = Text(root, height=2, width=20)
         wtext.pack()
         texts.append(wtext)
     # end for
     Button(root, text="Clear all", command=clear_all).pack(side=LEFT)
     Button(root, text="Quit", command=root.destroy).pack(side=RIGHT)
     # events main loop
     root.mainloop()
# end def

if __name__ == "__main__":
     # launch test series
     for n in range(1, 4):
         test(n)
     # end for
# end if
[/CODE]

Detailed description of the issue:

* French keyboards are arranged in such a way that you must compose 
accented letters as ê (e circumflex) or ë (e diaeresis) by pressing 
first the '^' key and then the letter to compose with (e.g. a, e, i, o, 
u, y) in order to get the final composite-accented letter (â, ä, ê, ë, 
and so on);

* when you launch the test script (cited above) and then type, let's 
say, the e circumflex letter (ê) into the Entry widget and into the Text 
widget, respectively:

	* the first time, you'll get the right letters inserted into the input 
widgets;
	* then click on 'Clear all' button and enter once again the same 
composite-accented letter into *ALL* the input widgets;
	* secund time, only the last pack()-ed input widget will get the right 
input, all other widgets will show unaccented letters;

* the test script tries with 1 Entry and 1 Text input widgets, then with 
2 input widgets and finally with 3 input widgets;

* each time you get the same issue: only the last pack()-ed input widget 
shows the right input letter, all the rest showing unaccented letters.

This issue is quite embarrassing for me as my latest software manages 
with movie scenario scriptwriting, which *MUST* be written with correct 
accents in French, otherwise all the purpose of the software would collapse.

Is this a known issue?

Thank you for your expert advice.

Regards.

Raphaël SEBAN alias tarball69.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss
Patrick Robertson | 28 Jan 08:20 2015
Picon

Tkinter colours lighter on OS X

I’m having a problem whereby every colour I declare in Tkinter (background colour, font colour etc.) is always a shade lighter when viewed on OS X.

Take for example the test code:

import Tkinter root = Tkinter.Tk() root.configure(bg="#000000") root.configure(borderwidth=20) root.geometry('%dx%d+%d+%d' % (200, 200, 200, 200)) frame = Tkinter.Frame(root, bg="#444444", borderwidth=20) frame.pack(fill=Tkinter.BOTH) frame2 = Tkinter.Frame(frame, bg="#999999", height=120) frame2.pack(fill=Tkinter.BOTH) root.mainloop()

If you run this on OS X and then open up DigitalColor Meter and hover over each box, you will see that the two lighter grey colours don't match what is in the code.
If I hover over the the inner square, I get #A9A9A9 (instead of #999999), and the middle square gives #565656 (instead of #444444).
I also get the same thing for .gifs I load using Tkinter.PhotoImage(data=…). For images I have tried changing the sRGB/RGB setting of the image to no avail

I'm running OS X 10.9 with Python 2.7.8, Tc/Tk 8.5 (Tkinter specifies __version__ = '$Revision: 81008 $')
Has anybody else experienced this problem, and if so what is the right fix? Thanks



_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss
Vasilis Vlachoudis | 22 Jan 17:24 2015
Picon
Picon

Text folding of text

Dear all,

I want to create a text box with folding capabilities.
To show/hide lines of text (probably using the elide function)
but when I hide the text I want it to be replaced by one line
+---- 10 lines folded ----
that extends to the full width of the text widget
and the editing is disabled on that line.

Is it possible to disable the editing on specific lines/tags?

Thanks in advance
Vasilis

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Gmane