Quickly from the top of my head I think this would work...
On mouse click, check if the mouses click X value was greater than the objects, if so it means you need to make the object wider, so get the difference between the objects X value and the mouss Click X value and then add that to the width.
You can do the same for the Y value and change its height accordingly.
I hope this makes sense, if not I will try and do it later and upload the capx