Jump to content

Resizable status bar without SBARS_SIZEGRIP


Go to solution Solved by pixelsearch,

Recommended Posts

Posted
2 hours ago, WildByDesign said:

I just tested the latest update with all variations and did not experience any issues.

Delighted to hear this, thanks for the 4 tests !

By the way, I'll try to find a way to solve this : while we resize the GUI, the distance between the right side of the last statusbar part and the sizebox should stay constant.

Actually, this distance increases a bit while we enlarge the GUI ( due to the calculation which uses $g_aRatioW ) but it would probably display better if this particular distance was constant, with the sizebox always "stuck" to the right size of the last statusbar part during resizing.

It's not really important, we'll see... Meanwhile, I tried to group several examples from the help file, so I'll be able to have results not only from my computer, but also from a Win11 computer in a few days. These results may help to understand better what should exactly be the height/width of the sizebox etc...

StatusBartests.png.ad91db050d3c3307e8c334436ff503a4.png

I'll have a bit less time to do this, as family is coming tomorrow and we'll spend some time together :)

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted
2 hours ago, jpm said:

the fact that the last part is not forcing filling to end of status bar will be a breaking script

imho it may be a breaking script change, for example those who already scripted like this during the last years...

Local $aParts[3] = [75, 150, 230] ; user's code

...which was seen like this inside Gary's function...

Local $aParts[3] = [75, 150, -1] ; UDF's code

...then they had a status bar which used all the GUI width and maybe they were happy with this display. If today you change Gary's function, they'll have a much smaller status bar and won't be happy at all, unless they rework their code.

2 hours ago, jpm said:

Do you think your solution is good for every body?

No it is not, because my function _MyGUICtrlStatusBar_SetParts got only 2 parameters (Gary got 3 in _GUICtrlStatusBar_SetParts)

Even the following line I added in my last script won't help in the UDF : it seems to solve everything in the script (I tested the 4 possibilities and @WildByDesign kindly re-tested them in his last post, confirming all possibilities passed the test) :

If $aParts[Ubound($aParts) - 1] = -1 Then $aParts[Ubound($aParts) - 1] = $iW ; client width size

I think it's a bit late to change Gary's function and it's not really important after all. My one and only regret is this : I've always been told and read that AutoIt was a "wrapper" for msdn, so I don't understand why did Gary force the last parameters to be -1 in any case, when msdn never said it was mandatory.

I understand that a status bar should use all the GUI width, but as msdn didn't make it mandatory (on their SB_SETPARTS web page) then AutoIt should have done same, years ago, no more, no less and no big deal.

So please let's not change anything in the UDF, noone ever complained about it... until we started this thread ;)

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted
On 4/22/2025 at 12:21 PM, argumentum said:

I say fake it 'till you make it

I didn't get a chance to say this earlier but I wanted to say that your fake it 'till you make it label-type status bar is absolutely worthy of a UDF, someday. I understand that you are busy lately. But someday in the future. Your examples for very nice looking and functionally great. In many ways, they are easier to size and manage in comparison to the real status bars. Also, the real status bars do not play as nicely with theming such as the Dark Mode UDF. Yours does. Thank you for your time on this as well.

The current reality is, I think that I will end up using your fake it 'till you make it label-type status bar in my current project. The problem is that my current project already has a UDF which uses $WM_DRAWITEM and it conflicts with the $WM_DRAWITEM used with the other status bar examples here. I tried everything possible during the past few days with no luck.

Posted
10 hours ago, pixelsearch said:

I'll have a bit less time to do this, as family is coming tomorrow and we'll spend some time together

Enjoy this time anytime you can, absolutely! :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...