Mercurial > traipse_dev
comparison orpg/tools/predTextCtrl.py @ 59:5aff3ef1ae46 ornery-dev
New dev branch for Ornery Orc. Adds CSS styling to chat messages. Updates
Update Manager to 0.7.1. Fixes problem with gametree and names. Adds a multi-
line text entry, grows as you type more lines; not reactive to Shift-Enter,
yet.
author | sirebral |
---|---|
date | Tue, 11 Aug 2009 17:48:30 -0500 |
parents | 4385a7d0efd1 |
children | 118fbe111922 |
comparison
equal
deleted
inserted
replaced
58:27e58b0483e7 | 59:5aff3ef1ae46 |
---|---|
31 ## Module Loading | 31 ## Module Loading |
32 ## | 32 ## |
33 | 33 |
34 import string | 34 import string |
35 from orpg.orpg_windows import * | 35 from orpg.orpg_windows import * |
36 from wx.lib.expando import ExpandoTextCtrl | |
36 | 37 |
37 # This line added to test CVS commit | 38 # This line added to test CVS commit |
38 | 39 |
39 ## | 40 ## |
40 ## Class Definitions | 41 ## Class Definitions |
302 # wx.TextCtrl.__init__(self,parent,id,value,size,style,name) | 303 # wx.TextCtrl.__init__(self,parent,id,value,size,style,name) |
303 # wx.TextCtrl.OnChar(self,Event) | 304 # wx.TextCtrl.OnChar(self,Event) |
304 # | 305 # |
305 # Defines: | 306 # Defines: |
306 # findWord(self,insert,st) | 307 # findWord(self,insert,st) |
307 class predTextCtrl(wx.TextCtrl): | 308 class predTextCtrl(ExpandoTextCtrl): |
308 | 309 |
309 # Initialization subroutine. | 310 # Initialization subroutine. |
310 # | 311 # |
311 # self : instance of self | 312 # self : instance of self |
312 # parent: reference to parent window (wxWindow, me-thinks) | 313 # parent: reference to parent window (wxWindow, me-thinks) |
330 # passing events up the chain. | 331 # passing events up the chain. |
331 def __init__(self, parent, id = -1, value = "" , size = wx.DefaultSize, style = 0, name = "text",keyHook = None, validator=None): | 332 def __init__(self, parent, id = -1, value = "" , size = wx.DefaultSize, style = 0, name = "text",keyHook = None, validator=None): |
332 | 333 |
333 # Call super() for default behavior | 334 # Call super() for default behavior |
334 if validator: | 335 if validator: |
335 wx.TextCtrl.__init__(self, parent, id=id, value=value, size=size, style=style, name=name, validator=validator ) | 336 ExpandoTextCtrl.__init__(self, parent, id=id, value=value, size=size, style=style, name=name, validator=validator ) |
336 else: | 337 else: |
337 wx.TextCtrl.__init__(self, parent, id=id, value=value, size=size, style=style, name=name) | 338 ExpandoTextCtrl.__init__(self, parent, id=id, value=value, size=size, style=style, name=name) |
338 | 339 |
339 self.tree = LetterTree # Instantiate a new LetterTree. | 340 self.tree = LetterTree # Instantiate a new LetterTree. |
340 # TODO: make name of word file an argument. | 341 # TODO: make name of word file an argument. |
341 | 342 |
342 | 343 |