If you self build Code::Blocks here is a patch to try.
The patch may NOT be safe to apply to CB SVN Truck
Because I edited the project_options.xrc file using text editor (I could not find the correct GUI method to edit it).
Because I am at beginner level at using wxWidgets GUI stuff like xrc and sizer.
Because the value of <size>120,360</size> was chosen almost at random; looks OK on Windows; no idea on other OSes.
Tim S.
Index: src/src/resources/project_options.xrc
===================================================================
--- src/src/resources/project_options.xrc (revision 9841)
+++ src/src/resources/project_options.xrc (working copy)
@@ -255,8 +255,11 @@
<object class="sizeritem">
<object class="wxBoxSizer">
<object class="sizeritem">
- <object class="wxListBox" name="lstBuildTarget" />
- <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <object class="wxListBox" name="lstBuildTarget">
+ <size>120,360</size>
+ <style>wxLB_HSCROLL</style>
+ </object>
+ <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
</object>
<object class="sizeritem">
<object class="wxBoxSizer">
Reproduced. I've even modified it to include a long target name.
By dynamic layout you're probably talking about this snippet:
// make sure everything is laid out properly
// before adding panels from plugins
// we don't want the dialog to become huge ;)
// note that a similar situation in editor settings had been solved by commenting
// the following line out...
GetSizer()->SetSizeHints(this);
I've commented it and it fixed only the first problem. It didn't fix the very-long-named-target problem.
I've taken a look here http://docs.wxwidgets.org/trunk/classwx_list_box.html and it seems there are problems with the ListBox control.
Have we tried to use a wxListCtrl instead?
Can someone post a screenshot from a windows machine with my patch and adding a Layout(); call after the lines
lstTargets->SetMinSize(wxSize(width, 200));
DoTargetChange(false);"
?
Can someone post a screenshot from a windows machine with my patch and adding a Layout(); call after the lines
lstTargets->SetMinSize(wxSize(width, 200));
DoTargetChange(false);"
?
I noticed no change; I am starting to think it is a wxWidgets 2.8 and Windows 7 32 bit bug.
I think this line is not working correctly on my PC using wxWidgets 2.8 and Windows 7 32 bit.
lstTargets->SetColumnWidth(0, wxLIST_AUTOSIZE);
It works different in wx3.0.0 build the Width is twice what is needed for max target.
I think we need a different tester to verify it is not a problem on my PC.
Tim S.
Have you tried to debug cb and see what is the value of width?
Trying for my forth time using wxWidgets 2.8; first three got the below message.
Program received signal SIGSEGV, Segmentation fault.
In _pthread_cleanup_dest () (E:\OpenSourceCode\Apps\IDEs\CodeBlocks\codeblocks_custom_build\src\devel\share\codeblocks\plugins\xpmanifest.dll)
wx 3.0.0 width is 165
Tim S.