Re: Hide text in entry box when i click on it.(GUI using Tkinter in python)

2017-01-25 Thread Peter Otten
hmmeeranrizv...@gmail.com wrote: > Hello Guys, > Here i am creating a entry box with some text,i need to hide the text when > i click on it. Here is my code > > from Tkinter import * > obj = Tk() > b = Entry(obj,width=100) > b.insert(0,"Enter the value to search&q

Hide text in entry box when i click on it.(GUI using Tkinter in python)

2017-01-24 Thread hmmeeranrizvi18
Hello Guys, Here i am creating a entry box with some text,i need to hide the text when i click on it. Here is my code from Tkinter import * obj = Tk() b = Entry(obj,width=100) b.insert(0,"Enter the value to search") b.pack() mainloop() -- https://mail.python.org/mailman/listinfo/python-list

Re: need help to get my python image to move around using tkinter

2016-11-18 Thread Thomas Grops via Python-list
thankyou so much, that is the exact help I required to put me in the right direction :D -- https://mail.python.org/mailman/listinfo/python-list

Re: need help to get my python image to move around using tkinter

2016-11-18 Thread Peter Otten
canvas.update() > > # Pause for 0.1 seconds, then delete the image > time.sleep(0.1) You should never use sleep() in conjunction with tkinter. Instead make a little function that schedules itself for invocation after a few milliseconds: def move(): ... # move

need help to get my python image to move around using tkinter

2016-11-18 Thread twgrops--- via Python-list
Hi I am new here and to python, I am currently studying towards my degree in computer science and have to build a program but I have hit a brick wall. I am trying to make an image move around the canvas. I can make a rectangle move using the following: #test rectangle id1=canvas.create_rectangl

Re: tkinter callbacks stop working

2016-10-21 Thread Peter Otten
namenobodywa...@gmail.com wrote: > hello pythonistas > > the script below plays tictactoe; everything works; but if i replace the > block at the bottom > > if True: > > > with this instead > > def function(): Below I use main() instead. >

tkinter callbacks stop working

2016-10-21 Thread namenobodywants
hello pythonistas the script below plays tictactoe; everything works; but if i replace the block at the bottom if True: with this instead def function(): function() then the tkinter callbacks don't work anymore; can anybody make sense of this? thanks if you can help peace st

Tkinter with native look-and-feel (was: [FAQ] "Best" GUI toolkit for python)

2016-10-17 Thread Ben Finney
Paul Rubin writes: > If you're just getting started and you're not trying to make something > super slick, I'd suggest Tkinter. It's easy to learn and use, you can > bang stuff together with it pretty fast, it's included with various > Python distributio

Re: rocket simulation game with just using tkinter

2016-10-05 Thread Irmen de Jong
On 5-10-2016 2:43, Dennis Lee Bieber wrote: > Or do what I once did with the Lunar Lander game on my college > computer... Target accuracy: Excellent... Landing gear? somewhere on the > other side of the moon. My vertical velocity was sub-inches per second -- > the horizontal velocity was in

Re: rocket simulation game with just using tkinter

2016-10-04 Thread Irmen de Jong
nding a bit by touching down anywhere on the ground, for instance just a little bit to the right of the starting launchpad. The real challenge is of course to land it on the other launchpad without touchdowns in between. >> Also I've discovered that there seems to be an issue with

Re: rocket simulation game with just using tkinter

2016-10-04 Thread Christian Gollwitzer
g trouble, but only because my game playing skills are not very good ;) Also I've discovered that there seems to be an issue with some Tkinter versions; it sometimes doesn't update the screen fast enough. On OSX this problem is not present but it is on Python 2.7 on Windows for example

Re: rocket simulation game with just using tkinter

2016-10-02 Thread Irmen de Jong
Arrow keys could be an option. For my education what are the 2 keys to the > right of > the P then on your keyboard? > > Rebinding the keys should be easy though just change them in the keypress and > keyrelease > methods. > > Irmen I've updated the keybindings

Re: rocket simulation game with just using tkinter

2016-10-01 Thread Irmen de Jong
On 1-10-2016 15:44, Christian Gollwitzer wrote: > Am 01.10.16 um 00:59 schrieb Irmen de Jong: >> Hi, >> >> I've made a very simple rocket simulation game, inspired by the recent >> success of SpaceX > >> You can get the code here if you want to give it a try: >> https://github.com/irmen/rocketsim

Re: rocket simulation game with just using tkinter

2016-10-01 Thread Christian Gollwitzer
fore I can successfully play this, though. My [] "keys" are in fact combinations of Alt+5 and Alt+6 on a German Macbook keyboard (on a German PC, it is AltGr+8, AltGr+9). Why not using the arrow keys? These should be pretty universal Christian So you just need python 2/3 with

Re: rocket simulation game with just using tkinter

2016-10-01 Thread Sayth Renshaw
can make a simple graphics animation game with just > using Tkinter, > instead of using other game libraries such as PyGame. > As it turns out, that works pretty well and it was quite easy to write. > Granted, there's > not much going on on the screen, but still the game runs very sm

rocket simulation game with just using tkinter

2016-09-30 Thread Irmen de Jong
Hi, I've made a very simple rocket simulation game, inspired by the recent success of SpaceX where they managed to land the Falcon-9 rocket back on a platform. I was curious if you can make a simple graphics animation game with just using Tkinter, instead of using other game libraries su

Re: Tkinter file dialog screwed

2016-09-14 Thread Kerbingamer376
On Wednesday, September 14, 2016 at 2:14:16 AM UTC+1, Steve D'Aprano wrote: > On Wed, 14 Sep 2016 06:08 am, kerbingamer376 wrote: > > > The tkinter file dialog is, for me, unusable. Whenever I try to use it, it > > opens, but all the text is white on a white backgr

Re: Tkinter file dialog screwed

2016-09-13 Thread Steve D'Aprano
On Wed, 14 Sep 2016 06:08 am, kerbingamer376 wrote: > The tkinter file dialog is, for me, unusable. Whenever I try to use it, it > opens, but all the text is white on a white background (see this > http://xomf.com/qzhgy) making it unusable. This has happened on 2 linux > systems, bot

Re: Tkinter file dialog screwed

2016-09-13 Thread martinjp376
yes, I can make the labels turn black by selecting them with the arrow keys. -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter file dialog screwed

2016-09-13 Thread Christian Gollwitzer
Am 13.09.16 um 22:08 schrieb kerbingamer376: The tkinter file dialog is, for me, unusable. Whenever I try to use it, it opens, but all the text is white on a white background (see this http://xomf.com/qzhgy) making it unusable. This has happened on 2 linux systems, both KDE plasma 5. Any help

Tkinter file dialog screwed

2016-09-13 Thread kerbingamer376
The tkinter file dialog is, for me, unusable. Whenever I try to use it, it opens, but all the text is white on a white background (see this http://xomf.com/qzhgy) making it unusable. This has happened on 2 linux systems, both KDE plasma 5. Any help? -- https://mail.python.org/mailman/listinfo

Re: Python 3 tkinter graphical statistical distributions fitter

2016-08-24 Thread Daniel Riaño
Please accept my apologies for sending the message to the full list 😬 2016-08-24 13:11 GMT+02:00 Daniel Riaño : > Thanks, James! > > 2016-08-13 12:46 GMT+02:00 : > >> I created a Python 3 tkinter graphical statistical distributions fitting >> application that will fit

Re: Python 3 tkinter graphical statistical distributions fitter

2016-08-24 Thread Daniel Riaño
Thanks, James! 2016-08-13 12:46 GMT+02:00 : > I created a Python 3 tkinter graphical statistical distributions fitting > application that will fit a 1D data set to all of the continuous > statistical distributions in scipy.stats, with graphical display of the > distributions plo

Tkinter based GUI for PIP : Needed Feedback

2016-07-03 Thread Upendra Kumar
Hello everyone, We have made a preliminary version of GUI for PIP. This project is a part of GSoC 2016. This project is intended to provide a GUI version for "pip". ( target audience for the project : beginners in Python ). The project idea is discussed on these issues : 1. Issue #23551 : IDLE

Re: [tkinter] widget size adjustment

2016-06-22 Thread Christian Gollwitzer
Am 22.06.16 um 23:18 schrieb Zachary Ware: On Wed, Jun 22, 2016 at 4:05 PM, Christian Gollwitzer wrote: BTW, the Tkinter wrapper is a bit clumsy for this option. In the original Tk, the sticky option is just a string. You can still pass that and do sticky='nsew' instead of

Re: [tkinter] widget size adjustment

2016-06-22 Thread Zachary Ware
On Wed, Jun 22, 2016 at 4:05 PM, Christian Gollwitzer wrote: > BTW, the Tkinter wrapper is a bit clumsy for this option. In the original > Tk, the sticky option is just a string. You can still pass that and do > > sticky='nsew' > > instead of the clumsy

Re: [tkinter] widget size adjustment

2016-06-22 Thread Christian Gollwitzer
ion to fill the height, center in left-right. sticky=NSEW pins it at all four sides which consequently stretches it in both directions. BTW, the Tkinter wrapper is a bit clumsy for this option. In the original Tk, the sticky option is just a string. You can still pass that and do

Re: [tkinter] widget size adjustment

2016-06-22 Thread Pierre-Alain Dorange
Christian Gollwitzer wrote: > > If you do not see the background, then indeed the canvas is not resized, > which means the gridding options are wrong. Looking at your code, I see > this: > > self.map.grid(row=1,column=1,rowspan=4,columnspan=2,padx=2,pady=2) > > Here, you do not specify any sti

Re: [tkinter] widget size adjustment

2016-06-22 Thread Christian Gollwitzer
Am 22.06.16 um 19:42 schrieb Pierre-Alain Dorange: Christian Gollwitzer wrote: Perhaps your assumption is wrong. Maybe the canvas itself *is* resized, so the white space you see around the image is the background of the canvas. To test this easily, set a strong color for the background:

Re: [tkinter] widget size adjustment

2016-06-22 Thread Pierre-Alain Dorange
redrawn. In that callback function, you get the new width and height > from the event object. Resize the image accordingly (using a PIL function). I miss something, here event.width just return me the canvas size, not resized... The full code was on github : <https://github.com/padorange/

Re: [tkinter] widget size adjustment

2016-06-21 Thread Pierre-Alain Dorange
Rick Johnson wrote: > However, what do you expect your images to do when the > window is morphed: Stretch or Resize? Resize. The map image is a (small) portion of a virtual infitine map of the world (build throught downloading tiles images from tile map servers) : user can drag the map to see a

Re: [tkinter] widget size adjustment

2016-06-21 Thread Rick Johnson
sizing will maintain the image integrity (in most cases). Have you considered these realities? For instance, it's easy to create an expanding grid of widgets with Tkinter, here is a simple example that uses a grid of buttons: ## BEGIN CODE ## import Tkinter as tk from Tkconstants import * #

Re: [tkinter] widget size adjustment

2016-06-21 Thread Christian Gollwitzer
Am 21.06.16 um 19:24 schrieb Pierre-Alain Dorange: A picture is often better than words, here is a scren capture of my apps before and after resing the main window : It was a map viewer similar to online javascript mapviewer but in a loca

Re: [tkinter] widget size adjustment

2016-06-21 Thread Pierre-Alain Dorange
assembled with the grid manager, so with cells (row and line coordinates). I allrady set the grid so that only the central cell (where the map is deisplayed) will be resize (all other row and colum do not resize). I'm a beginner with tkinter, and i could not found a way to get the cell size (t

Re: [tkinter] widget size adjustment

2016-06-21 Thread Rick Johnson
On Sunday, June 19, 2016 at 1:29:11 PM UTC-5, Pierre-Alain Dorange wrote: > I got a small interface handle with tkinter / Gridmanager. > I configure row and column to follow user window size > adjustement, that' fine. but i do not know how to adjust > the main widget : a ca

[tkinter] widget size adjustment

2016-06-19 Thread Pierre-Alain Dorange
Hi, I got a small interface handle with tkinter / Gridmanager. I configure row and column to follow user window size adjustement, that' fine. but i do not know how to adjust the main widget : a canvas displaying a portion of a big image. I bind a resize event that works, but do not know wh

Re: error with tkinter, help

2016-04-18 Thread BlueRidiculous
gt; > > So I was reading https://wiki.python.org/moin/TkInter for help. > > > > I got to step 3 under "Checking your Tkinter support." > > > > Nothing happens when I do steps 1 or 2, and when I do step 3, > > > > I get this error: > > >

Re: error with tkinter, help

2016-04-17 Thread Chris Angelico
On Mon, Apr 18, 2016 at 3:17 AM, BlueRidiculous wrote: >> How did you install Python? The Windows PSF installer from python.org >> will create this directory unless you uncheck the box to include tcl/tk. >> >> -- >> Terry Jan Reedy > > What is a PSF installer? Anyway, I installed the "Windows x86

Re: error with tkinter, help

2016-04-17 Thread BlueRidiculous
On Sunday, April 17, 2016 at 10:18:09 AM UTC-7, BlueRidiculous wrote: > On Saturday, April 16, 2016 at 9:30:39 PM UTC-7, Terry Reedy wrote: > > On 4/16/2016 9:31 PM, blueridicul...@gmail.com wrote: > > > So I was reading https://wiki.python.org/moin/TkInter for help. > >

Re: error with tkinter, help

2016-04-17 Thread BlueRidiculous
On Saturday, April 16, 2016 at 9:30:39 PM UTC-7, Terry Reedy wrote: > On 4/16/2016 9:31 PM, blueridicul...@gmail.com wrote: > > So I was reading https://wiki.python.org/moin/TkInter for help. > > I got to step 3 under "Checking your Tkinter support." > > Nothing

Re: error with tkinter, help

2016-04-16 Thread Terry Reedy
On 4/16/2016 9:31 PM, blueridicul...@gmail.com wrote: So I was reading https://wiki.python.org/moin/TkInter for help. > I got to step 3 under "Checking your Tkinter support." > Nothing happens when I do steps 1 or 2, and when I do step 3, > I get this error: Traceback (mo

error with tkinter, help

2016-04-16 Thread blueridiculous
So I was reading https://wiki.python.org/moin/TkInter for help. I got to step 3 under "Checking your Tkinter support." Nothing happens when I do steps 1 or 2, and when I do step 3, I get this error: " Traceback (most recent call last): File "", line 301, in runc

Re: Change Windows Tkinter after some time

2016-04-10 Thread Terry Reedy
don't work. I and others have written multiple answers on Stackoverflow about making root.after work. I suggest that you search "[tkinter] root.after" there. [snip somewhat baroque code] I urge you to read SO's "How to create a Minimal, Complete, and Verifiable example&q

Re: Change Windows Tkinter after some time

2016-04-10 Thread Terry Reedy
itten multiple answers on Stackoverflow about making root.after work. I suggest that you search "[tkinter] root.after" there. [snip somewhat baroque code] I urge you to read SO's "How to create a Minimal, Complete, and Verifiable example" https://stackoverflow.com/help/mcve

Change Windows Tkinter after some time

2016-04-10 Thread Diego Lelis
I need to make a change between windows, after some time. But i am have a little bit of trouble making my code work: My windows change only when i click on button, i tried to put lambda in my command and also don't work. import tkinter as tk # python3 #import Tkinter as tk # python i

Re: Label behavior's difference between tkinter and ttk

2016-04-05 Thread ast
ot inclined to see a bug here. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com BitmapImage comes from tkinter. It doesn't rxist in ttk -- https://mail.python.org/mailman/listinfo/python-list

Re: Label behavior's difference between tkinter and ttk

2016-04-05 Thread Kevin Walzer
In general, the "img.config" syntax is suitable for the classic Tk widgets, not the themed ttk widgets. They have a very different (and very gnarly) syntax for indicating changed state. I am not inclined to see a bug here. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykev

Re: Can't load Tkinter in embedded Python interpreter on Windows

2016-04-05 Thread Kevin Walzer
Adding PySys_SetArgv(argc, argv); did the trick. -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Label behavior's difference between tkinter and ttk

2016-04-05 Thread Terry Reedy
On 4/5/2016 2:57 AM, ast wrote: Hello I currently migrate a GUI from tkinter to ttk and I found a problem Here is a piece of code, with comments which explain what is wrong. Here is a complete program that eliminates manual entry and uses .mainloop and .after for the delays. import

Re: Label behavior's difference between tkinter and ttk

2016-04-05 Thread Terry Reedy
, isn't it ? I am using python 3.5.1 I tried a root.update_idletasks() to refresh the graphic but it changed nothings. I'm no tkinter expert, but I do know that there is a huge difference between the way that tk and ttk widgets are configured. In this case, it is the embed

Re: tkinter Entry validation modes

2016-04-05 Thread Mark Lawrence via Python-list
AIK, every keyword-only configuration option can be changed. e['validate'] = xyz e.config(validate=xyz) Yes, there's an write up on it here http://effbot.org/tkinterbook/tkinter-widget-configuration.htm -- My fellow Pythonistas, ask not what our language can do for you, ask what yo

Re: Label behavior's difference between tkinter and ttk

2016-04-05 Thread Mark Lawrence via Python-list
On 05/04/2016 07:57, ast wrote: Hello I currently migrate a GUI from tkinter to ttk and I found a problem Here is a piece of code, with comments which explain what is wrong. import tkinter as tk import tkinter.ttk as ttk root = tk.Tk() BITMAP0 = """ #define zero_width 24 #def

Can't load Tkinter in embedded Python interpreter on Windows

2016-04-05 Thread Kevin Walzer
I am trying to build a stub exe on Windows that embeds Python and launches my Tkinter app. I want a full-blown exe program starter because the various Python freezing tools (py2exe, pyinstaller) do not work to my satisfaction with Python 3.5. I am able to get the executable built but I cannot

Label behavior's difference between tkinter and ttk

2016-04-05 Thread ast
Hello I currently migrate a GUI from tkinter to ttk and I found a problem Here is a piece of code, with comments which explain what is wrong. import tkinter as tk import tkinter.ttk as ttk root = tk.Tk() BITMAP0 = """ #define zero_width 24 #define zero_height 32 static

Re: tkinter Entry validation modes

2016-04-02 Thread Terry Reedy
On 4/2/2016 11:11 AM, Mark Lawrence via Python-list wrote: A typical call to create an Entry field would be:- e = Entry(master, validate='all', ...) Once this call has been made is it possible to change the validation mode at runtime? AFAIK, every keyword-only configuration option can be chan

Re: tkinter Entry validation modes

2016-04-02 Thread Wildman via Python-list
knocking up an app so I can play with > the various modes so that I can see how they work, as I'm just venturing > into the tkinter world. This is off the top of my head and I have not tested it. Since validate is a config option this might do it: e.config(validate='focus'

tkinter Entry validation modes

2016-04-02 Thread Mark Lawrence via Python-list
rk, as I'm just venturing into the tkinter world. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter --> Why multiple windows

2016-03-25 Thread kevind0718
On Thursday, March 24, 2016 at 9:24:44 PM UTC-4, Wildman wrote: > On Thu, 24 Mar 2016 13:24:16 -0700, kevind0718 wrote: > > > Hello: > > > > newbie Tkinter question > > > > If I run the code below two windows appear. > > One empty and one with the

Re: Tkinter --> Why multiple windows

2016-03-24 Thread Terry Reedy
On 3/24/2016 4:43 PM, kevind0...@gmail.com wrote: On Thursday, March 24, 2016 at 4:29:03 PM UTC-4, Random832 wrote: On Thu, Mar 24, 2016, at 16:24, kevind0...@gmail.com wrote: If I run the code below two windows appear. One empty and one with the text box and button. >>> Why? The answer to

Re: Tkinter --> Why multiple windows

2016-03-24 Thread Wildman via Python-list
On Thu, 24 Mar 2016 13:24:16 -0700, kevind0718 wrote: > Hello: > > newbie Tkinter question > > If I run the code below two windows appear. > One empty and one with the text box and button. > > Why? please > > KD > > > > from Tkinter import * &g

Re: Tkinter --> Why multiple windows

2016-03-24 Thread kevind0718
On Thursday, March 24, 2016 at 4:29:03 PM UTC-4, Random832 wrote: > On Thu, Mar 24, 2016, at 16:24, kevind0...@gmail.com wrote: > > Hello: > > > > newbie Tkinter question > > > > If I run the code below two windows appear. > > One empty and one with the tex

Re: Tkinter --> Why multiple windows

2016-03-24 Thread Random832
On Thu, Mar 24, 2016, at 16:24, kevind0...@gmail.com wrote: > Hello: > > newbie Tkinter question > > If I run the code below two windows appear. > One empty and one with the text box and button. The empty one is the root window. -- https://mail.python.org/mailman/listinfo/python-list

Tkinter --> Why multiple windows

2016-03-24 Thread kevind0718
Hello: newbie Tkinter question If I run the code below two windows appear. One empty and one with the text box and button. Why? please KD from Tkinter import * class MyDialog: def __init__(self, parent): top = self.top = Toplevel(parent) Label(top, text="Value&q

Re: exit from Tkinter mainloop Python 2.7

2016-03-09 Thread Rick Johnson
, no, but simply instructs Tkinter to stop processing events? Once a user clicks your "continue" button, he can no longer interact with the GUI, and the user is left in a state of befuddlement. Those who've attempted to help you have suggested that you utilize the quit method in yo

RE: Adding Icon To Tkinter Window - Followup

2016-03-09 Thread Joaquin Alzola
> root.wm_iconphoto(True, img) What are the images format allowed? This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or disclose its content but contact the sender immediately upon receipt. -- https://mail.python.org/mailm

Re: Adding Icon To Tkinter Window - Followup

2016-03-09 Thread Serhiy Storchaka
On 06.03.16 18:30, Wildman via Python-list wrote: That does not work... $ ./makexface.py Traceback (most recent call last): File "./makexface.py", line 236, in root.wm_iconphoto(True, img) File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1897, in __getattr__ return getattr(self

Re: Adding Icon To Tkinter Window

2016-03-09 Thread Rick Johnson
On Saturday, March 5, 2016 at 3:39:00 PM UTC-6, Terry Reedy wrote: > No single simple statement work for all situations. You should have > specified OS, Python version, and tcl/tk version. (IDLE's Help -> About > IDLE displays full tk version). Yes, because Tkinter is not

Re: Adding Icon To Tkinter Window

2016-03-09 Thread Rick Johnson
's title bar, instead of the default icon that Tkinter uses. It would help if he posted the code he tried, along with any exceptions that were raised. -- https://mail.python.org/mailman/listinfo/python-list

Re: Adding Icon To Tkinter Window - Followup

2016-03-06 Thread Wildman via Python-list
On Sun, 06 Mar 2016 10:16:55 +0100, Christian Gollwitzer wrote: > Am 06.03.16 um 06:53 schrieb Wildman: >> On Sat, 05 Mar 2016 19:36:19 +0100, Christian Gollwitzer wrote: >>> import Tkinter >>> from Tkinter import Tk >>> root = Tk() >>> i

Re: Application console for Tkinter program?

2016-03-06 Thread Terry Reedy
On 3/6/2016 4:23 AM, Christian Gollwitzer wrote: Am 05.03.16 um 22:16 schrieb Terry Reedy: Not now. A console is a REPL + text display to read from and print to. The actual IDLE REPL is PyShell.ModifiedInterpreter, which subclasses stdlib code.InteractiveInterpreter. Most of the additions are f

Re: Application console for Tkinter program?

2016-03-06 Thread Christian Gollwitzer
Am 05.03.16 um 22:16 schrieb Terry Reedy: Not now. A console is a REPL + text display to read from and print to. The actual IDLE REPL is PyShell.ModifiedInterpreter, which subclasses stdlib code.InteractiveInterpreter. Most of the additions are for interacting with the subprocess that runs user

Re: Adding Icon To Tkinter Window - Followup

2016-03-06 Thread Christian Gollwitzer
Am 06.03.16 um 06:53 schrieb Wildman: On Sat, 05 Mar 2016 19:36:19 +0100, Christian Gollwitzer wrote: import Tkinter from Tkinter import Tk root = Tk() img = Tkinter.Image("photo", file="appicon.gif") root.call('wm','iconphoto',root._w,img) The abov

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
I apologize to the group for my lack of information in my original post. I will do better in the future. I very much want to remain in good standing in this group because of all the knowledgeable people here. Thanks again to everyone that replied and helped me solve my problem. -- GNU/Linux u

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
> > No single simple statement work for all situations. You should have > specified OS, Python version, and tcl/tk version. (IDLE's Help -> About > IDLE displays full tk version). > > Here is the current code from idlelib.PyShell, written by Serhiy > Storchak

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 21:55:40 +0200, Serhiy Storchaka wrote: > On 05.03.16 18:47, Wildman via Python-list wrote: >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks. > > On Windows: > >

Re: Adding Icon To Tkinter Window - Followup

2016-03-05 Thread Wildman via Python-list
mples on the web >>> but they all result in an error. Thanks. >> >> I found this and it works in Linux but only with black >> and white xbm images (I would prefer color): >> >> root.wm_iconbitmap('@myicon.xbm') > > iconphoto is the newer

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Terry Reedy
, Python version, and tcl/tk version. (IDLE's Help -> About IDLE displays full tk version). Here is the current code from idlelib.PyShell, written by Serhiy Storchaka, our current tkinter maintainer. # set application icon icondir = os.path.join(os.path.dirname(__file__), 'I

Re: Application console for Tkinter program?

2016-03-05 Thread Terry Reedy
On 3/5/2016 6:45 AM, Christian Gollwitzer wrote: Am 05.03.16 um 11:15 schrieb Terry Reedy: On 3/5/2016 2:52 AM, Christian Gollwitzer wrote: is there an easy way to add an application console to a Tkinter program? Right now, you should turn the question around. so this means no, right

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Serhiy Storchaka
On 05.03.16 18:47, Wildman via Python-list wrote: Anybody have the correct method of adding an icon to a window? I have found several code examples on the web but they all result in an error. Thanks. On Windows: root.wm_iconbitmap(default='myapp.ico') .ico-file can contain several icons

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 18:38:57 +, Mark Lawrence wrote: > On 05/03/2016 16:47, Wildman via Python-list wrote: >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks. >> > > Would you please b

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 18:08:15 +, Grant Edwards wrote: > On 2016-03-05, Wildman wrote: > >> Anybody have the correct method of adding an icon to a >> window? I have found several code examples on the web >> but they all result in an error. Thanks. > > You'll have to be a lot more specific a

Re: Adding Icon To Tkinter Window - Followup

2016-03-05 Thread Christian Gollwitzer
black and white xbm images (I would prefer color): root.wm_iconbitmap('@myicon.xbm') iconphoto is the newer API for color icons. I am a bit surprised that it is not wrapped in Tkinter, which is odd. You can still call it via eval: import Tkinter from Tkinter import Tk root

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Mark Lawrence
On 05/03/2016 16:47, Wildman via Python-list wrote: Anybody have the correct method of adding an icon to a window? I have found several code examples on the web but they all result in an error. Thanks. Would you please be kind enough to read this http://www.catb.org/esr/faqs/smart-questions

Re: Adding Icon To Tkinter Window - Followup

2016-03-05 Thread Wildman via Python-list
On Sat, 05 Mar 2016 10:47:09 -0600, Wildman wrote: > Anybody have the correct method of adding an icon to a > window? I have found several code examples on the web > but they all result in an error. Thanks. I found this and it works in Linux but only with black and white xbm images (I would pre

Re: Adding Icon To Tkinter Window

2016-03-05 Thread Grant Edwards
On 2016-03-05, Wildman wrote: > Anybody have the correct method of adding an icon to a > window? I have found several code examples on the web > but they all result in an error. Thanks. You'll have to be a lot more specific about what you mean by "add an icon to a window". Do you just want to

Adding Icon To Tkinter Window

2016-03-05 Thread Wildman via Python-list
Anybody have the correct method of adding an icon to a window? I have found several code examples on the web but they all result in an error. Thanks. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Application console for Tkinter program?

2016-03-05 Thread Christian Gollwitzer
Am 05.03.16 um 11:15 schrieb Terry Reedy: On 3/5/2016 2:52 AM, Christian Gollwitzer wrote: is there an easy way to add an application console to a Tkinter program? Right now, you should turn the question around. so this means no, right? Is there an easy way to run a tkinter program within

Re: Application console for Tkinter program?

2016-03-05 Thread Terry Reedy
On 3/5/2016 2:52 AM, Christian Gollwitzer wrote: is there an easy way to add an application console to a Tkinter program? Right now, you should turn the question around. Is there an easy way to run a tkinter program within an interactive console? Answer: yes, two ways, after removing the

Application console for Tkinter program?

2016-03-05 Thread Christian Gollwitzer
Hi all, is there an easy way to add an application console to a Tkinter program? For instance, can you embed IDLE into a program such that when a button is pressed, it pops up a REPL window where the running program can be examined? Say, there is a simple program like

Re: exit from Tkinter mainloop Python 2.7

2016-03-04 Thread Peter Otten
kevind0...@gmail.com wrote: > > > Christian & Others: > > Thanks for your attention to this matter. > My code now look like this: > > from Tkinter import * > > > def butContinue(): > dbUser = entryName.get() Here you set the local variabl

Re: exit from Tkinter mainloop Python 2.7

2016-03-04 Thread kevind0718
Christian & Others: Thanks for your attention to this matter. My code now look like this: from Tkinter import * def butContinue(): dbUser = entryName.get() pWord = entryPWord.get() print dbUser print pWord root1.quit() dbUser = "" pWord = "&qu

Re: [Newbie] Tkinter Question

2016-02-25 Thread Randy Day
In article , best_...@yahoo.com says... [snip] > Anyway, I am happy with the outcome even though I have > not found a way to detect when the program is force > killed. It is unlikely that would ever occur as long When your peogram starts, have it create a small file. As part of your graceful s

Re: [Newbie] Tkinter Question

2016-02-24 Thread Wildman via Python-list
On Tue, 23 Feb 2016 16:19:43 -0600, Wildman wrote: > Thanks to Christian and Chris. You both gave me much to think about and to experiment with. That adds to my on-going learning experience. This is the first thing I tried: The Exit button has this: command=self.quit Then I have this: def

Re: exit from Tkinter mainloop Python 2.7

2016-02-24 Thread Dave Farrance
kevind0...@gmail.com wrote: >from Tkinter import * > >def butContinue(): >root1.destroy() As Christian said, you're destroying the root window and its children, so instead use root1.quit() here. > ... > >root1.mainloop() > >print entryName.get("1.0&qu

Re: exit from Tkinter mainloop Python 2.7

2016-02-23 Thread Peter Otten
Christian Gollwitzer wrote: > Am 23.02.16 um 22:39 schrieb kevind0...@gmail.com: >> from Tkinter import * >> >> def butContinue(): >> root1.destroy() >> [...] >> entryName = Entry(root1).grid(row=1, column=1, pady=5) >> [...] >> but

Re: [Newbie] Tkinter Question

2016-02-23 Thread Chris Kaynor
On Tue, Feb 23, 2016 at 2:19 PM, Wildman via Python-list < python-list@python.org> wrote: > I am familiar with OO programming but I am new to Python > and Tkinter. I am working on a gui program that creates > a couple of temporary files. As part of the Exit button > comman

Re: [Newbie] Tkinter Question

2016-02-23 Thread Christian Gollwitzer
Am 23.02.16 um 23:19 schrieb Wildman: I am familiar with OO programming but I am new to Python and Tkinter. I am working on a gui program that creates a couple of temporary files. As part of the Exit button command they are deleted. If the program is shut down using the window close button [X

Re: exit from Tkinter mainloop Python 2.7

2016-02-23 Thread Christian Gollwitzer
Am 23.02.16 um 22:39 schrieb kevind0...@gmail.com: lblTop = Label(root1, text= ' Enter Values Below', font="Helvetica 14").grid(row=0, column=0, columnspan=2 , pady=5) ##lblTop.pack(side = TOP) lblDB = Label(root1,text= 'Weight').grid(row=1, column=0 ) lblPWord = Label(root1, text=

Re: exit from Tkinter mainloop Python 2.7

2016-02-23 Thread Christian Gollwitzer
Am 23.02.16 um 22:39 schrieb kevind0...@gmail.com: from Tkinter import * def butContinue(): root1.destroy() [...] entryName = Entry(root1).grid(row=1, column=1, pady=5) [...] butGo = Button(root1, text=" Continue " , command=butContinue ).grid(row=3, column=1, sticky=

[Newbie] Tkinter Question

2016-02-23 Thread Wildman via Python-list
I am familiar with OO programming but I am new to Python and Tkinter. I am working on a gui program that creates a couple of temporary files. As part of the Exit button command they are deleted. If the program is shut down using the window close button [X], the exit button code is not executed

<    2   3   4   5   6   7   8   9   10   11   >