anyone else think the new default height for wxTextCtrl is crazy?

This appears to be a problem on Windows, I'm running Win2K SP4. I don't see the problem on the Mac.

I thought I had a bug in my code and wasted some time trying to track down something size related only to discover that the default height of the wxTextCtrl, at least with the wxTE_RICH2 style is now dependent on the text you supply it during init. If the initial text string is empty then you get a height of 73, 'hello world' and the height is 138, 'the\nquick\nbrown\nfox\jumped\n' and the height is 242. It just keeps getting taller and taller.

ka

I've been trying to update my XP box with the latest wxPython and am
encountering corruption messages during the install, even when I download
from different Sourceforge sources.

In the non-Unicode package, stops with an alert re:
Wxmsw251h_core_vc.dll

In the Unicode package, it was claiming source file corruption re:
images.py

However, I'd think there'd be more such reports if it really were a problem
with the install file, so I'll post this here with a grain of salt. Might
be something on my end.

Kirby

Kevin Altis wrote:

This appears to be a problem on Windows, I'm running Win2K SP4. I don't see the problem on the Mac.

I thought I had a bug in my code and wasted some time trying to track down something size related only to discover that the default height of the wxTextCtrl, at least with the wxTE_RICH2 style is now dependent on the text you supply it during init. If the initial text string is empty then you get a height of 73, 'hello world' and the height is 138, 'the\nquick\nbrown\nfox\jumped\n' and the height is 242. It just keeps getting taller and taller.

If no size is given then the create will set the control to its "best size". For multi-line wxTextCtrls (on MSW at least) it uses the number of lines of text, up to a max of 5, in the calculation of the best height.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

The old 2.4.x calculation made more sense.

ka

···

On Apr 20, 2004, at 2:44 PM, Robin Dunn wrote:

Kevin Altis wrote:

This appears to be a problem on Windows, I'm running Win2K SP4. I don't see the problem on the Mac.
I thought I had a bug in my code and wasted some time trying to track down something size related only to discover that the default height of the wxTextCtrl, at least with the wxTE_RICH2 style is now dependent on the text you supply it during init. If the initial text string is empty then you get a height of 73, 'hello world' and the height is 138, 'the\nquick\nbrown\nfox\jumped\n' and the height is 242. It just keeps getting taller and taller.

If no size is given then the create will set the control to its "best size". For multi-line wxTextCtrls (on MSW at least) it uses the number of lines of text, up to a max of 5, in the calculation of the best height.

Kevin Altis wrote:

···

On Apr 20, 2004, at 2:44 PM, Robin Dunn wrote:

Kevin Altis wrote:

This appears to be a problem on Windows, I'm running Win2K SP4. I don't see the problem on the Mac.
I thought I had a bug in my code and wasted some time trying to track down something size related only to discover that the default height of the wxTextCtrl, at least with the wxTE_RICH2 style is now dependent on the text you supply it during init. If the initial text string is empty then you get a height of 73, 'hello world' and the height is 138, 'the\nquick\nbrown\nfox\jumped\n' and the height is 242. It just keeps getting taller and taller.

If no size is given then the create will set the control to its "best size". For multi-line wxTextCtrls (on MSW at least) it uses the number of lines of text, up to a max of 5, in the calculation of the best height.

The old 2.4.x calculation made more sense.

The DoGetBestSize impl in 2.4 is exactly the same. Maybe the 2.4 version didn't set itself to its best size when created (which would have been a bug.)

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!