Multiline wxStaticText

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
bobmitch
In need of some credit
In need of some credit
Posts: 1
Joined: Sun May 15, 2005 10:39 am
Location: UK

Multiline wxStaticText

Post 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.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post 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]
SteveP
Knows some wx things
Knows some wx things
Posts: 27
Joined: Tue Feb 08, 2005 10:40 pm
Contact:

Post 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.
Dev-C++ 4.9.9.2-wx-beta-6.7
Windows 2000
Vixus
Knows some wx things
Knows some wx things
Posts: 45
Joined: Sun Mar 13, 2005 12:41 pm

Post by Vixus »

1. How do you do them in Delphi??
2. Something to do with wordwrapping?
buildere
Super wx Problem Solver
Super wx Problem Solver
Posts: 358
Joined: Thu Oct 28, 2004 3:45 pm
Location: Costa Rica

Post 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/
SteveP
Knows some wx things
Knows some wx things
Posts: 27
Joined: Tue Feb 08, 2005 10:40 pm
Contact:

Post by SteveP »

Thank you very much. I'm assuming I should uninstall my current version if wxDevCPP before installing the alpha.
Dev-C++ 4.9.9.2-wx-beta-6.7
Windows 2000
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post 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.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
SteveP
Knows some wx things
Knows some wx things
Posts: 27
Joined: Tue Feb 08, 2005 10:40 pm
Contact:

Post 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.
Dev-C++ 4.9.9.2-wx-beta-6.7
Windows 2000
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post 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.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
Vixus
Knows some wx things
Knows some wx things
Posts: 45
Joined: Sun Mar 13, 2005 12:41 pm

Post 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!)
lowjoel
Part Of The Furniture
Part Of The Furniture
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post 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)
leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post 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.
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/
lowjoel
Part Of The Furniture
Part Of The Furniture
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel »

i dont know but that seems to be what wxDev-C++ is doing - they are setting a static size
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post 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
Everybody's got something to hide except for me and my monkey.
lowjoel
Part Of The Furniture
Part Of The Furniture
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel »

thanks alot for helping :D ive been busy trying to settle it :P
Post Reply