Menu

#12 Double chars in Edit widgets

open
nobody
5
2003-03-21
2003-03-21
No

Using pyui 0.95 and pygame, each keypress produces two characters
in an edit box.

The problem appears to be because each character is added to the
text in Edit._pyuiKeyDown, and again in Edit._pyuiChar.

sample code to produce the error:

import pyui
import pygame

pyui.init(320, 200, '2d')
dialog = pyui.dialogs.Dialog(0,0,100,50, "Test")
dialog.addChild(pyui.widgets.Edit("", 10, lambda x: None))
dialog.pack()
dialog.doModal()
while 1:
pyui.update()
pyui.draw()

Discussion


Log in to post a comment.