Page 1 of 1

Multiline wxStaticText

Posted: Sun May 15, 2005 10:54 am
by bobmitch
I am having trouble with saving multiline static text controls. I can create them OK, and I save all alterations. Next time reopen programme, the text controls revert to single line (going off form!).
I have used Delphi for several years, and wxDevC++ seems to create controls in a similiar manner.
Am I doing something wrong, or is wxDevC++ not yet sufficiently developed?
Please don't think I am critising, wxDevC++ is a terrific programme and must represent hours of work without benefit of the large teams that modern software employ.

Posted: Sun May 15, 2005 6:12 pm
by tbreina
I am having trouble with saving multiline static text controls. I can create them OK, and I save all alterations. Next time reopen programme, the text controls revert to single line (going off form!).
Sounds like a bug, but I'm not sure how you are generating the multiline static text control. Can you give me the procedure to do this? If I can reproduce the behavior, I'll try to create a fix for the next release.

Please don't think I am critising, wxDevC++ is a terrific programme and must represent hours of work without benefit of the large teams that modern software employ.
No offense taken. I think the project is not yet 1 year old now (Beta 1 (2004-07-19)) and for the first few months was pretty much all coded by Guru. So there's still lots to do. The core group at present consists of 4 guys (Guru, Mal, Esteban, and me). We're always looking for more help.

The current alpha version (http://reina.homedns.org/wxdevcpp/wxdevcpp_alpha) has many fixed bugs (and some new features). Your static text bug seems to be present in the alpha too.

-Tony
[/quote]

Posted: Wed May 25, 2005 8:36 pm
by SteveP

The current alpha version (http://reina.homedns.org/wxdevcpp/wxdevcpp_alpha) has many fixed bugs (and some new features). Your static text bug seems to be present in the alpha too.
The link doesn't work.

Posted: Wed May 25, 2005 9:22 pm
by Vixus
1. How do you do them in Delphi??
2. Something to do with wordwrapping?

Posted: Wed May 25, 2005 9:41 pm
by buildere
SteveP wrote:

The current alpha version (http://reina.homedns.org/wxdevcpp/wxdevcpp_alpha) has many fixed bugs (and some new features). Your static text bug seems to be present in the alpha too.
The link doesn't work.
Here you go:
http://reina.homedns.org/wxdevcpp/wxdev ... a_testing/

Posted: Thu May 26, 2005 1:22 pm
by SteveP
Thank you very much. I'm assuming I should uninstall my current version if wxDevCPP before installing the alpha.

Posted: Thu May 26, 2005 1:28 pm
by NinjaNL
SteveP wrote:Thank you very much. I'm assuming I should uninstall my current version if wxDevCPP before installing the alpha.
NO, the alpha is just the wxDevCpp executable. simply rename your current executable (devpp.exe -> devcpp.old) then extract the cvs executable, rename it to devcpp.exe and move it to your devcpp folder.

Posted: Thu May 26, 2005 1:48 pm
by SteveP
Ahh gotcha, thanks for the help. It works.

Unfortunately, though, it still didn't fix the problem of the example program form the tutorial not compiling.

Posted: Thu May 26, 2005 3:19 pm
by NinjaNL
tbreina wrote:
I am having trouble with saving multiline static text controls. I can create them OK, and I save all alterations. Next time reopen programme, the text controls revert to single line (going off form!).
Sounds like a bug, but I'm not sure how you are generating the multiline static text control. Can you give me the procedure to do this? If I can reproduce the behavior, I'll try to create a fix for the next release.
To create a multi line static text control, simply drop a static text control on the form and edit the label to reflect your text. To make it multi line simply add "\n" where you would want a new line. Then alter the height and width to reflect the desired size.

Unfortunately the altered height and width are not saved.

Posted: Thu May 26, 2005 3:40 pm
by Vixus
Strange... Something to do with wordwrap perhaps?? Kinda like my problem... oh by the way, can you align a wxStaticBitmap? Is that my problem (See my topic!)

Posted: Sun Jun 19, 2005 12:07 pm
by lowjoel
well this topic is kinda old but i think its the best place to add comments for this situation.

II've just installed the 2.6.1 devpak from ninjanl, and the generated text width size is not sufficient for the text field (stuff rendered in wxdevcpp isnt rendered correctly when run). I have to manually add up 1-5 more pixles to accomodate the difference, otherwise it wraps when the program is run. I've noticed that the 2.6.1 programs use a slightly different font, maybe thats why wxdevcpp is generating wrong sizes? (width)

Posted: Sun Jun 19, 2005 1:10 pm
by leio
lowjoel wrote:I've noticed that the 2.6.1 programs use a slightly different font,
It now uses the correct font for that stuff in WinXP/2000
lowjoel wrote:maybe thats why wxdevcpp is generating wrong sizes? (width)
Nothing should rely on the font width absolutely. The width must not be set statically, but rather some sizer used or so. Imagine what happens if a user has a really large monitor and has the font sizes made larger system-wide.

Posted: Sun Jun 19, 2005 1:43 pm
by lowjoel
i dont know but that seems to be what wxDev-C++ is doing - they are setting a static size

Posted: Sun Jun 19, 2005 4:56 pm
by tbreina
wxdevcpp 6.7beta uses an autosized static text in the Delphi design window. That's why it reverts size when the project is saved, closed, and re-opened.

I've changed this in the current CVS source. The current alpha on my website has a new implementation that should allow one to resize the static text and align it properly. Hopefully, it will now work as WYSIWYG.

You might want to give it a try. It would help us to work out any remaining bugs.

-Tony

Posted: Sun Jun 19, 2005 10:33 pm
by lowjoel
thanks alot for helping :D ive been busy trying to settle it :P