4 3678
from Tkinter import *
gui=Tk()
####code####
gui.geometry("+ %d+%d" %(300, 100))
gui.resizable(0 ,0)
gui.mainloop()
Will work offcourse too.. :-)
cheers,
Arjen
"duikboot" <ar************ ******@hccnet.n l> schreef in bericht
news:40******** *************@d reader5.news.xs 4all.nl... from Tkinter import * gui=Tk()
####code#### gui.geometry("+ %d+%d" %(300, 100)) gui.resizable(0 ,0)
if __name__=='__ma in__': gui.mainloop()
"Fuzzyman" <mi*****@foord. net> schreef in bericht news:80******** *************** ***@posting.goo gle.com... I'm having trouble implementing my GUI using Tkinter...... I've been working through the Tkinter tutorials from 'Programming Python' and am generally happy enough with the functionality and feel of the results *but* - I can't see how to set the size of the root window (or any top level window) and to stop it being resized........
Thanks for any help.
Fuzzyman
--
YAPLP Yet Another Python Links Page http://www.voidspace.org.uk/coollink...on_links.shtml
Python Utils http://www.voidspace.org.uk/atlantib...thonutils.html
--
http://www.Voidspace.org.uk The Place where headspace meets cyberspace. Online resource site - covering science, technology, computing, cyberpunk, psychology, spirituality, fiction and more.
--- http://www.atlantibots.org.uk http://groups.yahoo.com/group/atlantis_talk/ Atlantibots - stomping across the worlds of Atlantis. --- http://www.fuchsiashockz.co.uk http://groups.yahoo.com/group/void-shockz ---
Everyone has talent. What is rare is the courage to follow talent to the dark place where it leads. -Erica Jong Ambition is a poor excuse for not having sense enough to be lazy. -Milan Kundera
Short of actually trying it...... (when I get home I *will* try it)
Would the following work :
from Tkinter import *
gui=Tk()
Button(gui, text='A button', command=a_funct ion).pack()
####code####
gui.geometry("+ %d+%d" %(300, 100))
gui.resizable(0 ,0)
gui.mainloop()
??
If I recall correctly it ought to.... (mixing the pack and geometry
methods in the same GUI)...
Anyway - thanks.
Fuzzy
"duikboot" <ar************ ******@hccnet.n l> wrote in message news:<40******* **************@ dreader5.news.x s4all.nl>... from Tkinter import * gui=Tk()
####code#### gui.geometry("+ %d+%d" %(300, 100)) gui.resizable(0 ,0) gui.mainloop()
Will work offcourse too.. :-)
cheers,
Arjen "duikboot" <ar************ ******@hccnet.n l> schreef in bericht news:40******** *************@d reader5.news.xs 4all.nl... from Tkinter import * gui=Tk()
####code#### gui.geometry("+ %d+%d" %(300, 100)) gui.resizable(0 ,0)
if __name__=='__ma in__': gui.mainloop()
"Fuzzyman" <mi*****@foord. net> schreef in bericht news:80******** *************** ***@posting.goo gle.com... I'm having trouble implementing my GUI using Tkinter...... I've been working through the Tkinter tutorials from 'Programming Python' and am generally happy enough with the functionality and feel of the results *but* - I can't see how to set the size of the root window (or any top level window) and to stop it being resized........
Thanks for any help.
Fuzzyman
--
YAPLP Yet Another Python Links Page http://www.voidspace.org.uk/coollink...on_links.shtml
Python Utils http://www.voidspace.org.uk/atlantib...thonutils.html
--
http://www.Voidspace.org.uk The Place where headspace meets cyberspace. Online resource site - covering science, technology, computing, cyberpunk, psychology, spirituality, fiction and more.
--- http://www.atlantibots.org.uk http://groups.yahoo.com/group/atlantis_talk/ Atlantibots - stomping across the worlds of Atlantis. --- http://www.fuchsiashockz.co.uk http://groups.yahoo.com/group/void-shockz ---
Everyone has talent. What is rare is the courage to follow talent to the dark place where it leads. -Erica Jong Ambition is a poor excuse for not having sense enough to be lazy. -Milan Kundera
Fuzzyman wrote: Short of actually trying it...... (when I get home I *will* try it)
Would the following work :
from Tkinter import * gui=Tk() Button(gui, text='A button', command=a_funct ion).pack()
####code#### gui.geometry("+ %d+%d" %(300, 100)) gui.resizable(0 ,0) gui.mainloop()
??
Yes it will. Note however that doing gui.geometry("+ 300+100") will actually move
the window, not resize it. To resize the window, use gui.geometry("3 00x100")
More generally, the syntax for the geometry is "WxH+X+Y" where W and H are the
window's width and height resp. and X & Y the coordinates of its top-left corner
from the top-left corner of the screen.
If I recall correctly it ought to.... (mixing the pack and geometry methods in the same GUI)...
Anyway - thanks.
Fuzzy
"duikboot" <ar************ ******@hccnet.n l> wrote in message news:<40******* **************@ dreader5.news.x s4all.nl>...
from Tkinter import * gui=Tk()
####code#### gui.geometry("+ %d+%d" %(300, 100)) gui.resizable(0 ,0) gui.mainloop()
Will work offcourse too.. :-)
cheers,
Arjen "duikboot" <ar************ ******@hccnet.n l> schreef in bericht news:40****** *************** @dreader5.news. xs4all.nl...
from Tkinter import * gui=Tk()
####code## ## gui.geometry ("+%d+%d" %(300, 100)) gui.resizabl e(0,0)
if __name__=='__ma in__': gui.mainloop()
"Fuzzyman" <mi*****@foord. net> schreef in bericht news:80***** *************** ******@posting. google.com...
I'm having trouble implementing my GUI using Tkinter...... I've been working through the Tkinter tutorials from 'Programming Python' and am generally happy enough with the functionality and feel of the results *but* - I can't see how to set the size of the root window (or any top level window) and to stop it being resized........
Thanks for any help.
Fuzzyman
--
YAPLP Yet Another Python Links Page http://www.voidspace.org.uk/coollink...on_links.shtml
Python Utils http://www.voidspace.org.uk/atlantib...thonutils.html
--
http://www.Voidspace.org.uk The Place where headspace meets cyberspace. Online resource site - covering science, technology, computing, cyberpunk, psychology, spiritualit y, fiction and more.
--- http://www.atlantibots.org.uk http://groups.yahoo.com/group/atlantis_talk/ Atlantibo ts - stomping across the worlds of Atlantis. --- http://www.fuchsiashockz.co.uk http://groups.yahoo.com/group/void-shockz ---
Everyone has talent. What is rare is the courage to follow talent to the dark place where it leads. -Erica Jong Ambition is a poor excuse for not having sense enough to be lazy. -Milan Kundera
--
- Eric Brunel <eric dot brunel at pragmadev dot com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Richard Townsend |
last post by:
I've been experimenting with passing a window handle from a wxPython app to
a Tkinter app. The Tkinter app should embed a Toplevel window containing a
Canvas widget in the wxPython app's Frame (see example below).
Both apps run, but the Tkinter app's output doesn't appear.
Can anyone see why this isn't working?
Using wxPython-2.5.1/Python 2.3.3/Win98 and Win2000.
|
by: Tim Jarman |
last post by:
Apologies in advance for the long post - I wanted to be sure I included all
the relevant details. The answer is probably very, very simple.
I am doing something stupid here, but I don't know what it is. I'm writing
an application with a Tkinter GUI (Python 2.4, Tcl/Tk 8.4.) and I want to
put a custom icon on the main window.
I've followed (so far as I understand it) the recipe in the eff-bot's
splendid Introduction to Tkinter - see:...
|
by: Gordon Airporte |
last post by:
I'm trying to get my canvas to resize to fill its frame within a window,
but I can't figure out how to handle the callback data from the window's
<Configure> properly. It has very strange behavior - resizing randomly
or growing by itself, shrinking to 0. The following works passably but
jumps around at random if you move the window and goes nuts if you add
the button (watch any wrapping):
from Tkinter import *
|
by: Tor Erik Sønvisen |
last post by:
Hi
I create a canvas that is to big for the default window-size, so it gets cut
to fit...
How can I increase the window-size to make sure the canvas fits?
regards tores
|
by: Tuvas |
last post by:
Is there a way to make a new window pop up using Tkinter? I have some
functions that require more data in my interface than I have space for,
and would like to be able to pop up a new window to request this
information. Thanks!
| |
by: msoulier |
last post by:
Hello,
A friend is having an issue with Tkinter that I'm not able to help him
with, so I'm posting here.
He'd like to put something inside of a frame without the frame
automagickally resizing.
Example:
|
by: greenflame |
last post by:
I have a script that will make a window that shows the text I want
using Tkinter. What I need to do is to make another window popup above
the current window showing other text. I tryed:
-----------
from Tkinter imprt *
root = Tk()
L = Label(root, text="Blah")
|
by: iwl |
last post by:
Hi,
I tryed askstring to input some text in my script,
but some ugly empty Window appears with the
Input-Window behind and all together behind my
Console showing my script. So all have to brought
to the top first by the user - very unconfortable
|
by: Anish Chapagain |
last post by:
Hi!!
I'm trying to program an application which have multiple windows and
is capable of executing method defined inside class of one another, i
tries a simpel frame work here and am creating Toplevel inside method
as the new window to be genereated, and again want another window to
be loaded when the widget inside toplevel is executed as
necessary..but am feeling lost to either create a class for such new
window or write function again.....
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |