Board index » cppbuilder » moving controls during runtime...
|
Rory Walsh
CBuilder Developer |
moving controls during runtime...2006-06-20 06:50:43 PM cppbuilder96 Hi everyone. I have been having a reoccurring problem now for the last week or so and I'm really stuck. I am building an application that lets users place and move controls around on a form during runtime. Given that not all VCL components have a MouseDown method I'm using OnDrag methods to allow the user to move the components around. This is working Ok except for one MAJOR problem I can't seem to fix: whenever I click on a GUI control to move it it jumps first so that the top left hand corner aligns with the position of the cursor. I have searched through the archives but every fix uses one of the Mouse Down/Move methods which not all VCL components have access to, for example a TScrollBar. I posted code yesterday under the subject OnDrag..., if anyone can point me in a direction that does not uses a MouseDown method can you please let me know. Failing that, can anyone suggest an easier way to do this? Thanks, Rory. |
