Problem with Control Scaling in WebApp after Programmatic Width Change

Hi everyone,
I’m working on a Xojo WebApp and I’m having trouble with how a control scales when resizing the browser window.

Here’s the situation:
I have a PopupMenu that is locked to the left and right in the Inspector, so it automatically stretches/shrinks with the browser window size — and that works fine initially.

However, for certain reasons in my code, I need to reduce the width of the PopupMenu programmatically. After doing this, the control no longer scales properly with the window size. I also tried setting PopupMenu1.LockLeft = True in code again right after changing the width — but it doesn’t seem to help.

Has anyone encountered this before or know of a workaround?

Thanks in advance!

Try setting lock right to false, setting your width and then setting lock right to true.

Otherwise, show the code you’re using to set the width.

1 Like