Thanks for answering.Can you try to make sure the switch have correct parent and remove top anchor and see if that solves the problem?
Actually the only line in the designer is thisYeah, I think I was wrong there, sorry. My last suggestion is that you look at your designer scripts, and code, to make sure you don't change the height of the parent. Looking at your screenshots, it doesn't seem as high as it is in the designer. It does, however, look as wide, so I'm thinking that there is something adjusting the height. That would also explain why the switch have correct distance to parent top, and not to parent bottom.
'All variants script
AutoScaleAll
swDBClean.VerticalCenter = pnlDBClean.Height/2
If i remove that line happends that in the deisgner i see it like in the picture in the first post.And what happens if you comment out the AutoScaleAll?
Aha, in that case I think it's even simpler. The switch doesn't resize, so the hitbox needs to have the exact height of the switch to end up in the middle.i can center the hitbox, but not the switch..
Aha, in that case I think it's even simpler. The switch doesn't resize, so the hitbox needs to have the exact height of the switch to end up in the middle.
Dirty suggestion (in case you don't already have this info elsewhere): Take a screenshot on your phone, open picture in image editor and measure height of switch. Use that as height for the hitbox.
I wouldn't count on it. Just imagine a future OS upgrade that changes the design of the switch slightly, and height with it.i don't know if this is reliable
exactly, but unfortunaly i don't know how to do those things ahhah, i will wait for an answer from a B4i MagicianI wouldn't count on it. Just imagine a future OS upgrade that changes the design of the switch slightly, and height with it.
The correct way (assuming this last strategy is correct, in the first place) would be to do some code magic and ask the OS for the height of a switch. I have no idea how to do that, sorry.
If this is a strategy you believe in, the best thing you could do is search for info on Stack Overflow (and the like) on how to get that info in the first place. Then post a new thread asking how to convert that to B4i. That would make things a lot easier for the people who know how to do those things.i will wait for an answer from a B4i Magician
mmm something i've found before actually.. i will make a post for thatIf this is a strategy you believe in, the best thing you could do is search for info on Stack Overflow (and the like) on how to get that info in the first place. Then post a new thread asking how to convert that to B4i. That would make things a lot easier for the people who know how to do those things.