Page 1 of 2

Align Top

Posted: 16 Jun 2015, 18:08
by Mex
Hi Timo!

Lange nicht gesehen! :)

I'm testing your controls under Windows 10 TP and discovered strange problem with ReBar+ToolBar when using align - Top.
On my form i have my own custom control aligned to top (first control) and then ReBar+ToolBar aligned to top (second control).
Under Windows XP and 7 i have not noticed this problem, but under Windows 10 the ReBar alignment is messed up. When I resize form, ReBar's alignment is set to 0(see screenshots), but when i click on form where rebar+toolbar should be placed, rebar "jumps" to right place where it's positioned at design time.

Any ideas?

Best regards
Meelis

Re: Align Top

Posted: 16 Jun 2015, 20:10
by Mex
Hmm, I think it's not related to Windows 10. Same thing happens sometimes under Windows 7 and XP.

Also, when I set align to none and top value to N, then close designer and open again ReBar's Top value is set to 0.

Re: Align Top

Posted: 23 Jun 2015, 07:36
by TiKu
Hi,

Sorry, I did see this thread only now. Which version of ToolBarControls do you use? Version 1.2.3 from november fixes some problems with the Align property and the problems that you describe sound very much like those that I've fixed.
With version 1.2.3 I could not reproduce such problems so far - neither on Windows 7 nor on Windows 10.

Regards
TiKu

Re: Align Top

Posted: 23 Jun 2015, 09:20
by Mex
Hi,

Version i'm using is 1.2.3.228.

But still when I add ReBar's top to N (alignment is None), close designer and reopen again Top value is set to 0 again.

Regards
Meelis

Re: Align Top

Posted: 23 Jun 2015, 09:56
by TiKu
Hmm, maybe it is because I use a manifest file for VB6.exe so that I have themes within the IDE. I'll check without manifest tonight. But I can test only on Windows 7 and XP, because my Windows 10 currently is broken and needs to be reinstalled.

Re: Align Top

Posted: 23 Jun 2015, 09:59
by Mex
Uhhh found the reason!

It happens when ReBar's Left property is set to 0!



Regards
Meelis

Re: Align Top

Posted: 23 Jun 2015, 10:02
by TiKu
Strange... I'll check tonight.

Re: Align Top

Posted: 23 Jun 2015, 10:15
by Mex
If form's scalemode is Twips, then it happens when Left is 0-15(lower than TwipsPerPixel I think)

Happy testing! :)


Regards
Meelis

Re: Align Top

Posted: 23 Jun 2015, 20:58
by TiKu
I can reproduce the problem and I have a possible fix. But I would like to test it a bit more before I release an update. In the past I have changed this part of the code quite often because it always had small problems.

Re: Align Top

Posted: 24 Jun 2015, 22:20
by TiKu
Hi,

I've released version 1.2.4. It fixes the problem with the Align property and I really hope the fix does not reintroduce any of the previous bugs in this area.

Regards
TiKu

Re: Align Top

Posted: 25 Jun 2015, 06:02
by Mex
Hi and thank you!

Now it's working as expected.


Regards
Meelis

Re: Align Top

Posted: 23 Sep 2015, 12:15
by Mex
Hi again,

I found another strange problem with rebar and i cant figure out, what's causing this. I think it has something to do with rebars height and/or border.

1) On my form i have rebar as first top aligned control
2) Second top aligned control is picture box
3) Third top aligned control one my own contol

When classic theme is used, rebar is at top, but when theme is enabled, then rebar is last control (see pictures)


Regards
Meelis

Re: Align Top

Posted: 23 Sep 2015, 13:54
by Mex
OK found the reason, but why does this happen?

1) Add picturebox to form - align top
2) Add rebar to form - align top
3) Move rebar with the mouse to the top (first positon)
4) at desgin time rebar is the first control, but when you run the app, rebar is the second control

Any ideas?

Meelis

Re: Align Top

Posted: 23 Sep 2015, 17:53
by TiKu
As far as I remember the Z order is important if more than one control is aligned to the same side. So try playing around with the Z order in your Form_Load event. Maybe VB6 for some reason always creates intrinsic controls like the picture box first, and ActiveX controls afterwards. Actually I don't really know, but I'm aware that such problems pop up if you align multiple controls to the same side.

Regards
TiKu

Re: Align Top

Posted: 23 Sep 2015, 18:34
by Mex
z-order does not help.

Tested same scenario with 2 pictureboxes and with pboxes everything works. For some reasons this affects only rebar, but I must test with other controls too.



Meelis