Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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 December 9th, 2012, 01:37 PM
noskiw noskiw is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 18 noskiw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 30 m 46 sec
Reputation Power: 0
Curly Braces around text

Code:
RegErrorWin = GraphWin("Registration Error!",400,175)
        NoOfErrorsTextLabel = "There are",NoOfErrors,"errors:"
        NoOfErrorsText = Text(Point(68,15),NoOfErrorsTextLabel)
        NoOfErrorsText.draw(RegErrorWin)


Currently I'm getting curly braces around the text when it's printed on the screen. I've no idea why it's doing this, I've googled it, and had no such luck. Only with TKinter problems. I'm using the graphics module.

And while I've got this thread going, I'm having another problem, that once the user clicks on a window, it disables them from clicking again, which can happen by mistake, but can be frustrating, I'm not sure how to fix it.

It's this whole function here:

Code:
def RegisterScreen():
    RegisterWin = GraphWin("Register",300,150)
    UsernameRegLabel = Text(Point(45,25),"Username: ")
    UsernameRegLabel.draw(RegisterWin)
    UsernameRegText = Entry(Point(175,25),20)
    UsernameRegText.draw(RegisterWin)
    PasswordRegLabel = Text(Point(45,50),"Password: ")
    PasswordRegLabel.draw(RegisterWin)
    PasswordRegText = Entry(Point(175,50),20)
    PasswordRegText.draw(RegisterWin)
    PasswordConfRegLabel = Text(Point(52,75),"Confirm: ")
    PasswordConfRegLabel.draw(RegisterWin)
    PasswordConfRegText = Entry(Point(175,75),20)
    PasswordConfRegText.draw(RegisterWin)
    EmailRegLabel = Text(Point(60,100),"Email: ")
    EmailRegLabel.draw(RegisterWin)
    EmailRegText = Entry(Point(175,100),20)
    EmailRegText.draw(RegisterWin)
    SubmitButton = Rectangle(Point(195,115),Point(265,140))
    SubmitButton.draw(RegisterWin)
    SubmitButtonText = Text(Point(230,128),"Submit")
    SubmitButtonText.draw(RegisterWin)
    CloseButton = Rectangle(Point(115,115),Point(185,140))
    CloseButton.draw(RegisterWin)
    CloseButtonText = Text(Point(150,128),"Close")
    CloseButtonText.draw(RegisterWin)

    MouseRegWin = RegisterWin.getMouse()
    RegWinX = MouseRegWin.getX()
    RegWinY = MouseRegWin.getY()

    if RegWinX>=195 and RegWinX<=265:
        if RegWinY>=115 and RegWinY<=140:
            global RegisterData
            
            RegisterData = []

            Username = UsernameRegText.getText()
            Password = PasswordRegText.getText()
            PasswordConf = PasswordConfRegText.getText()
            Email = EmailRegText.getText()

            RegisterData.append(Username)
            RegisterData.append(Password)
            RegisterData.append(PasswordConf)
            RegisterData.append(Email)
            
            ProcessRegistration()
            
    elif RegWinX>=115 and RegWinX<=185:
        if RegWinY>=115 and RegWinY<=140:
            RegisterWin.close()


It's mainly the bottom bit:

Code:
if RegWinX>=195 and RegWinX<=265:
        if RegWinY>=115 and RegWinY<=140:
            global RegisterData
            
            RegisterData = []

            Username = UsernameRegText.getText()
            Password = PasswordRegText.getText()
            PasswordConf = PasswordConfRegText.getText()
            Email = EmailRegText.getText()

            RegisterData.append(Username)
            RegisterData.append(Password)
            RegisterData.append(PasswordConf)
            RegisterData.append(Email)
            
            ProcessRegistration()
            
    elif RegWinX>=115 and RegWinX<=185:
        if RegWinY>=115 and RegWinY<=140:
            RegisterWin.close()


Thanks for reading.

Reply With Quote
  #2  
Old December 10th, 2012, 07:09 AM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,372 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 3 Days 11 h 41 m 46 sec
Reputation Power: 383
Needs someone willing to investigate the graphics module and what looks like an incomplete code listing.

Noskiw: Please post a small working program that exhibits the problem.
__________________
[code]Code tags[/code] are essential for python code!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Curly Braces around text

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap