News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Build target window not resizing correctly.

Started by Souliest, June 11, 2014, 11:04:22 PM

Previous topic - Next topic

oBFusCATed

Hm, it seems that the list ctrl has not been expanded to width==200 pixels...

Probably I need to call something else, too and SetMinSize is not enough. Does anyone know what should be called?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MortenMacFly

Did you forget Layout()?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

Probably, but I cannot test it, because it works even without calling Layout() (probably on this).
I need someone to test this on windows.
Also I need to know if we want to do this change, so I can finish this patch.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

oBFusCATed

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);"


?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

Quote from: oBFusCATed on July 05, 2014, 05:51:22 PM
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Have you tried to debug cb and see what is the value of width?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

Quote from: oBFusCATed on July 06, 2014, 12:32:34 PM
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.

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

After about 8 tries got this

wx 2.8.12 width is 150

So, the width value is NOT that much difference between wx 3.0.0 and wx 2.8.12.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Ok, but the width of the control on your screen shot is just 100. So the SetMinSize has no effect. Can you try to replace it with SetSize()? (I'm just guessing here)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

Quote from: oBFusCATed on July 07, 2014, 01:35:55 AM
Ok, but the width of the control on your screen shot is just 100. So the SetMinSize has no effect. Can you try to replace it with SetSize()? (I'm just guessing here)

Just did that very weird results.

https://github.com/stahta01/cb_misc/blob/master/Notes/SetSize.png

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

This is close to the expected behaviour.
Now, the question is why SetMinSize doesn't work on windows?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

#26
Quote from: oBFusCATed on July 07, 2014, 02:22:37 AM
This is close to the expected behaviour.
Now, the question is why SetMinSize doesn't work on windows?

I added "Fit();" where you said to add Layout and it appears to be correct for wx 2.8 (It only cuts off one of the targets).

Edit: Still about twice too wide using wx 3.0.0; might try 3.0.1 tomorrow.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

Quote from: stahta01 on July 07, 2014, 02:31:38 AM
Quote from: oBFusCATed on July 07, 2014, 02:22:37 AM
This is close to the expected behaviour.
Now, the question is why SetMinSize doesn't work on windows?

I added "Fit();" where you said to add Layout and it appears to be correct for wx 2.8 (It only cuts off one of the targets).

Edit: Still about twice too wide using wx 3.0.0; might try 3.0.1 tomorrow.

Tim S.


No visible diff between  wx 3.0.0 and 3.0.1; still about twice too wide.

Might try wx trunk.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

I considered the wxWidgets Windows 7 32 bit build to look very good with your patch with these two changes.
1. Added Fit();
2. Added include of header (needed to get win32 wx3.0 project to build)

Link to TESTING DISPLAY ONLY patch that has those two changes.
https://github.com/stahta01/cb_misc/blob/master/Patches/svn/project_options_layout_many_target.patch

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]