Align Top

The place for threads about TimoSoft ToolBarControls.
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Align Top

Post 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
Attachments
win10tp_2.PNG
(73.58 KiB) Not downloaded yet
win10tp.PNG
(65.91 KiB) Not downloaded yet
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Align Top

Post 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.
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Align Top

Post 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
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Align Top

Post 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
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Align Top

Post 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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Align Top

Post by Mex »

Uhhh found the reason!

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



Regards
Meelis
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Align Top

Post by TiKu »

Strange... I'll check tonight.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Align Top

Post 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
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Align Top

Post 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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Align Top

Post 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
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Align Top

Post by Mex »

Hi and thank you!

Now it's working as expected.


Regards
Meelis
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Align Top

Post 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
Attachments
s1.jpg
(346.56 KiB) Not downloaded yet
s2.jpg
(281.37 KiB) Not downloaded yet
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Align Top

Post 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
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Align Top

Post 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
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: Align Top

Post 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
Attachments
tb test.zip
(356.8 KiB) Downloaded 473 times
Post Reply