11-05-2010 02:04 PM
I wish to move an existing control an offset number of pixels down. I know I can destroy the control and then re-introduce it to the panel at its new location, and I have seen the movectrl.fp example, but this is a much simpler task than that, I don't want to over-complicate things. What ctrl attribute can I tweak to make it move an offset?
Thanks in advance!
Solved! Go to Solution.
11-05-2010 04:59 PM - edited 11-05-2010 05:00 PM
You can do it this way:
GetCtrlAttribute (..., ..., ATTR_TOP, &top);
SetCtrlAttribute (.., ..., ATTR_TOP, top + offset);
Moving horizontally is done the same way by means of ATTR_LEFT attribute.
Remember that pixel coordinates start from the upper left corner and go downwards / rightwards