Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 14th, 2004, 04:43 AM
xlordt's Avatar
xlordt xlordt is offline
Only the strong survives!!.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Feb 2003
Location: A World of wonder.
Posts: 5,543 xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 23 h 40 m 13 sec
Reputation Power: 378
Send a message via ICQ to xlordt Send a message via AIM to xlordt Send a message via MSN to xlordt Send a message via Yahoo to xlordt Send a message via Google Talk to xlordt Send a message via Skype to xlordt
Facebook
grid() fuction

Ok this is weird.. why is it that when i used the pack() fuction my program was working proberly.. but once i changed a few things to .grid() the program does not want to run.. it just halts anyidea why?

Code:
class GUI:

      def __init__ (self, master):

          frame = Frame (master, bd=1, relief=SUNKEN)
          frame.pack (expand=YES, fill=BOTH)

          master.title (" Learning Program ")

          self.label = Label (frame, text="Message:", fg="blue").grid (row=0, sticky=W)

          self.entry = Entry (frame, border=1)
          self.entry.grid (row=0, column=1)

          self.buttonQuit = Button(frame, text="Quit", background="white",
                                   font="helvetica 7 bold",
                                   pady=1, padx=1, bitmap="error", command=frame.quit)
          self.buttonQuit.pack (side=RIGHT, fill=BOTH, expand=YES)


          self.button = Button (frame, text="Connect",
                                background="white",
                                font="helvetica 7 bold",
                                pady=1, padx=1, border=2)

          self.button.pack (side=RIGHT, fill=BOTH, expand=YES)
          self.button.bind("<Button-1>", self.change_color)

Reply With Quote
  #2  
Old March 14th, 2004, 07:13 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,532 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 38 m 15 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
The root of your problem - you can't use pack() and grid() together. So unfortuatly its one or the other although grid() seems to give you more controle over layout in general.

Mak.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
  #3  
Old March 14th, 2004, 11:00 AM
xlordt's Avatar
xlordt xlordt is offline
Only the strong survives!!.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Feb 2003
Location: A World of wonder.
Posts: 5,543 xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 23 h 40 m 13 sec
Reputation Power: 378
Send a message via ICQ to xlordt Send a message via AIM to xlordt Send a message via MSN to xlordt Send a message via Yahoo to xlordt Send a message via Google Talk to xlordt Send a message via Skype to xlordt
Facebook
Quote:
Originally Posted by netytan
The root of your problem - you can't use pack() and grid() together. So unfortuatly its one or the other although grid() seems to give you more controle over layout in general.

Mak.


oh hehe i didnt know that thanx is there anything there.. that i should shange or am i on the right track

Reply With Quote
  #4  
Old March 14th, 2004, 11:20 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,532 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 38 m 15 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
From what i can see its looking fine, just get choose between pack() and grid() - wouldn't quote me on this though, not really a GUI guru and Tkinter makes me sick

Mark.

Reply With Quote
  #5  
Old March 14th, 2004, 12:00 PM
xlordt's Avatar
xlordt xlordt is offline
Only the strong survives!!.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Feb 2003
Location: A World of wonder.
Posts: 5,543 xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 23 h 40 m 13 sec
Reputation Power: 378
Send a message via ICQ to xlordt Send a message via AIM to xlordt Send a message via MSN to xlordt Send a message via Yahoo to xlordt Send a message via Google Talk to xlordt Send a message via Skype to xlordt
Facebook
ya sorry i didnt mean to quote you.. im sick and im tring to learn python at once... for a moment i feel like going to bed but then again i feel like playing around sux when its like that, btw.. why does Tkinter make you sick? got anything better? your making me feel like if im waisting my time learning Tkinter

Reply With Quote
  #6  
Old March 14th, 2004, 12:59 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,532 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 38 m 15 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Awwwe, you tuck that totaly the wrong way lord. Sorry your feeling down! Anyway i wouldnt say learning Tk is a waste of time it just looks icky and to be honest seems out of date. So if i had to pick a GUI i'd have to go with wxPython.

dont quote me on that = i might be wrong

Hope this clears things up.

Mark.

Reply With Quote
  #7  
Old March 14th, 2004, 01:03 PM
xlordt's Avatar
xlordt xlordt is offline
Only the strong survives!!.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Feb 2003
Location: A World of wonder.
Posts: 5,543 xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1Folding Points: 109314 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 23 h 40 m 13 sec
Reputation Power: 378
Send a message via ICQ to xlordt Send a message via AIM to xlordt Send a message via MSN to xlordt Send a message via Yahoo to xlordt Send a message via Google Talk to xlordt Send a message via Skype to xlordt
Facebook
hehehe i will take a look on wxpython even though i never heard o it.. but i guess now i did hehe but for some stupid reason.. after coding in c/php for a while.. i understand python a bit more heh weird as they are not the same... although if you put 2 and 2 together they are all the same

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > grid() fuction


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway