pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Form

Form - 1.1

josmiley / Luke spywoker (mutualaccount)

Tags:

Description

a class that allows you to edit text
it manages mouse insertion and some controls keys.

new version, completely rewritten
function 'ask' has become a 'class' for more flexibility and is now called Form.
sorry, not yet documented ...

Changes

some changes

Links

Home Page: http://joel-murielle.perso.sfr.fr
Source: http://joel-murielle.perso.sfr.fr/ask.py

Screenshot


click to view original size

Releases

Form - 4.0 - Mar 29, 2011
Form - 3.2 - Mar 21, 2011
Form - 3.1 - Mar 21, 2011
Form - 3.0 - Mar 20, 2011
Form - 2.2 - Mar 15, 2011
Form - 2.1 - Mar 11, 2011
Form - 2.0 - Mar 10, 2011
Form - 1.1 - Jul 8, 2010
Form - 1.0 - Jul 5, 2010

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

December 29, 2010 1:43pm - Robert Leachman - nickname: (quazar) - 5/5
Thanks, works like a champ, I plan to use this. For anyone interested here's the patch to respond to the quit event... also only letters and numbers:
$ diff -wc ask_1.1.py ask_hack.py
*** ask_1.1.py 2010-12-29 10:37:40.000000000 -0800
--- ask_hack.py 2010-12-29 10:40:40.000000000 -0800
***************
*** 1,3 ****
--- 1,4 ----
+ import sys
from pygame import display,init,font,key,Rect,event
from pygame.locals import *
font.init()
***************
*** 64,69 ****
--- 65,71 ----
elif ev.key == K_ESCAPE: return None
elif ev.key == K_TAB: pass
elif (len(INPUT)-1<MAXLEN if MAXLEN else 1):
+ if (ev.key > 96 and ev.key < 123) or (ev.key > 47 and ev.key < 58):
INPUT.insert(INDEX,ev.unicode)
INDEX += 1
C = gen.next()
***************
*** 78,83 ****
--- 80,87 ----
C = gen.next()
elif Rect(ev.pos,(0,0)).colliderect(RECTANGLE):
event.post(event.Event(KEYDOWN,{'scancode': 115, 'key': 279, 'unicode': u'', 'mod': 4096}))
+ elif ev.type == QUIT:
+ sys.exit()
SCREEN.blit(BG,POS,(POS,RECTANGLE.size))
display.update((POS,RECTANGLE.size))
key.set_repeat(*repeat)
Thanks again Josmiley!
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Oct 1, 2014

Sep 19, 2014

Sep 17, 2014

Sep 9, 2014

Sep 8, 2014

Sep 7, 2014


Sep 5, 2014

Aug 26, 2014

Aug 21, 2014


Aug 18, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)