Josh,
The wx.TextCtrl.SetStyle call is wrong as this sets the text style
for a range of text, you need to set your control style at creation
time as per the attached.
Gadget/Steve
TextEntry.py (2.01 KB)
Josh,
The wx.TextCtrl.SetStyle call is wrong as this sets the text style
for a range of text, you need to set your control style at creation
time as per the attached.
Gadget/Steve
TextEntry.py (2.01 KB)
Yeah, I figured that out myself. Thought I deleted the post, too.
I thought it was possible to change some controls’ styles at will. TextCtrl isn’t one of them, as far as I can make out.
Josh
On Sun, May 20, 2012 at 2:18 AM, Gadget/Steve GadgetSteve@live.co.uk wrote:
On 20/05/2012 3:10 AM, Josh English wrote:
The wxDemo works just fine on my machine. I can type
in a multiline text box, get word wrap, and press Enter to get a
new line. It works.
I have attached a file that is not working, though. This is a
simplified case of what I deal with.
A Maker panel that can dynamically generate controls (in the
full app this also attaches validators)
The panel I use is a subclass of the Maker panel.
When I run this code, I can enter text into the multiline entry
box, but when I press enter all I get is a beep.
Windows 7 (64-bit)
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32
bit (Intel)]
wxPython 2.8.12.1
As I said, the wx Demo works fine.
Clearly, I’m missing something. Any help?
–
Josh English Joshua.R.English@gmail.com [http://www.joshuarenglish.com](http://www.joshuarenglish.com)
–
To unsubscribe, send email to
wxPython-users+unsubscribe@googlegroups.com
or visit [http://groups.google.com/group/wxPython-users?hl=en](http://groups.google.com/group/wxPython-users?hl=en)
Josh,
The wx.TextCtrl.SetStyle call is wrong as this sets the text style
for a range of text, you need to set your control style at creation
time as per the attached.Gadget/Steve
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
–
Josh English
Some styles can only be set when the widget is created because they may change how the native widget is created, or even which native widget is used.
On 5/20/12 11:47 AM, Josh English wrote:
Yeah, I figured that out myself. Thought I deleted the post, too.
I thought it was possible to change some controls' styles at will.
TextCtrl isn't one of them, as far as I can make out.
--
Robin Dunn
Software Craftsman