Webcontrol.width cancels Webcontrol.lockright?

Hi, everyone

I found that when I used code to change the width property of a text field control, it subsequently ignores the lockright property, which is set to True.

I used a msgbox to display the value of lockright after changing the width property. It reports True.

Is this meant to happen?

Regards - Keir

I’m not seeing this. I put code to change the width of the control in both the page shown event and in a button, and in both cases the control stays locked to the right side. There must be something else going on in your project. Try a simple test in a new project.

Edit: You didn’t say anything about the left being locked also. Do you have both left and right locked? I just tried it, and indeed it then ignores the right lock, even though the property still returns true.

A bug has been discussed before about trying to resize or move controls that are locked on both sides (either left/right or top/bottom). I don’t know if it was ever entered into Feedback, but it basically comes down to when you lock both sides of a control, you’re telling the framework to handle its size and position. If you then override that by changing the size or position in code, then the framework can’t do its job.

It’s a bug. Please file a report.

Hi, Jay

Thanks for your feedback. Yes, the control has the Lockleft and Locktop values set to True.

Greg - Will post a bug report within 24 hours.

Thanks, guys