Could I use setLeftandRight in coding?

Theera

Well-Known Member
Licensed User
Longtime User
Hi all,
I have ever used setLeftandRight and setTopandBottom in designer only,I don't know how to use them in coding.I wish to re-location the object.

P.S. Please understand my English,if I wrote mistake.

Best Regards
Theera
 

sorex

Expert
Licensed User
Longtime User
Theera,

Some of those handy commands are designer script commands only,
I wonder why because the precompiler should be able to change a
setLeftandRight to setLayout without any problem.

So as I mentioned you have this setLayout command to set the left, top, bottom & right (or was it width,height) in 1 single command in the normal activity scripts.

I usually place my object on the correct top and change the left (and width if needed) parameter by code since in most cases that's enough to place/center your object to a different sized (width) resolution.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
setLayout in coding = setLeftandRight,setTopandBottom in designer?

Hi sorex,

I wonder that setLayout have in coding,but not have in designer,in another hand, setLeftandRight,setTopandBottom have in designer,but not have in coding. Why not use the same function?

Best Regards
Theera
 
Last edited:
Upvote 0

sorex

Expert
Licensed User
Longtime User
Indeed, but a workaround is using codemodules that represend those designer command like Mahares said.

At the end the code would just be bigger compared to the precomiler supporting them,
but it's probably just a few KB.
 
Upvote 0
Top