drawing to graphics with Xojo 2018

I’m still using the ancient DWToolbar class that allows for drawing custom container controls (well sort of) into a custom toolbar. When I compile my project with Xojo2017r3 all is fine. With Xojo2018r1 (or r1.1) however some of the controls are nowhere to be seen, and I have no idea why that would be. The problem manifests itself on Windows only. I’d appreciate it highly if somebody could take a look at the demo project here:

http://contactking.de/downloads/xojo/DWToolbar-Test.xojo_binary_project

I’m still using the ancient DWToolbar class that allows for drawing custom container controls (well sort of) into a custom toolbar. When I compile my project with Xojo2017r3 all is fine. With Xojo2018r1 (or r1.1) however some of the controls are nowhere to be seen, and I have no idea why that would be. The problem manifests itself on Windows only. I’d appreciate it highly if somebody could take a look at the demo project here:

www.contactking.de/downloads/xojo/DWToolBar.zip

…and suggest a workaround. :wink:

Okay, solved it. If controls overlap you have to expect that sort of thing. Repositioning them in code works fine though. So all it took was pushing them to a different location in the IDE, and then set the .top and .left properties in code.

Spot on. Or you can do a similar thing in the IDE if you want, drag them where you want them to be, remember their left and top and move them out of the control then edit their positions in the inspector back to where you want them, this will ensure that they are not parented.

would you mind showing me a sample of what you have done??

Something like this would be nice:

Or an option like “Unlink from parent control” appears to be chosen when you right-click on a control linked to another one under it. This option just breaks the parenting relation between both.

I think just orphanizing a control like
me.parent=nil
in the open event should also suffice (haven’t checked yet). Well, once you realise the parenting is the problem there are a lot of solutions.

Xojo’s drawing policy currently differs too much between Mac and Windows for my taste. In its current state is too easy introduce drawing bugs like I have.