Moving and sizing a Web Rectangle at runtime

H folks,

I’m trying to move a rectangle within a Web Container at runtime. There are two, and both have identical properties (as far as I can see). One moves as expected, the other doesn’t and I can’t find the reason why. Any thoughts, gratefully received? I’d created properties and methods within the container for handling the positions, but they only work with the first rectangle. I’ve abandoned that and created a test button on the web page itself… my crude code is:

WebCont1.Rec1.Left = txtSetLeft.Text.ToInteger
WebCont1.Rec2.Left = txtSetLeft.Text.ToInteger

Also, my code seems to run very, very slowly. I’m on a brand new machine with an AMD Ryzen 9 processor and 32GB of RAM. Everything else flies along, so I feel I must be doing something wrong? I can live with this (at the moment), but any thoughts on the other issue would help enormously, thank you.

An example project would be very helpful.

Hi Greg, How do I supply that? Apologies, I’m a noob.

Post it on Dropbox or some other file sharing service and put the link here.

Hopefully that worked!?

Craig Robinson (our contracted expert) fixed this for me… so many thanks to him.

The fix is using the control’s style property:

WebCont1.Rec1.Left = txtSetLeft.Style.Value(“Left”) = txtSetLeft.Text + “px;”

This works without fail. It seems the standard property might be a bit flakey, as it’s just become temperamental with other controls too. I’ll continue to learn… liking it so far!