Roger Binns wrote:
I have a problem with the wxGridCellTextEditor. Even if you tell it to
use a maximum
width of 50, if the grid column width is only 10 characters wide, then it
will beep
at the 10th character and refuse to let you enter any more. If you make
the column
wider, then it will let you enter more (up to the actual max width you
told if the
column can have that much).
So how do I tell this thing to let you enter more text than the current
column
visibility?
Roger
I have not had this problem. I attach some sample code which shows how I do
it. It is just some code I had lying around from some previous testing, so
it has some other junk in it, but I think/hope you can glean what you need
quite easily.
You will see in MyGrid that I set column 0 to a size of 10, and I set up an
editor with a max width of 3 on row 1. So if you try to enter something in
row 1, column 0, you should be restricted to a length of 3, even though you
can only see one character.
A side effect of using the MULTILINE style is that it does not beep when it
hits the limit (at least under Windows - I do not have sound on my Linux
box). I saw Robin's post that suggests that we should not use MULTILINE any
more, so I will experiment with that.
HTH
Frank Millman
fm10.py (5.59 KB)