I've been making some resizable objects, and I figure since the code is pretty easy to understand, I'll just toss it on here for people to check out!
There may be a better way to do this, but I've found that this works quite well. This code only does a horizontal resize, but its pretty easy to duplicate it to work for both X and Y. I know, because I've got the fully finished script here, but this'll be part of the challenge of learning. Learn by duplication! Now, its important to note that this just resizes the ONE main object. In order to resize objects within that object, you'll need to add a "Sub Object_OnSize(width,height)" sub in the main object to dynamically change the widths of inner elements. That make sense? Ok, good. Heres the code, which you put into the 'dragable' resizer object, whose parent is the main object. It is NOT a child object! With that said, good luck!
Sub Object_OnDrag(x,y,newX,newY)
Object.Top = DesktopX.Object("TutorialBG").Top + 18
If newX - DesktopX.Object("TutorialBG").Left + 50 > 300 Then
DesktopX.Object("TutorialBG").width = newX - DesktopX.Object("TutorialBG").Left + 50
Else
Object.Left = DesktopX.Object("TutorialBG").left + 250
DesktopX.Object("TutorialBG").width = Object.Left - DesktopX.Object("TutorialBG").Left + 50
End If
End Sub
Please note, I made this using this kind of layout:
--------------------------------------
| Parent Object with stuff (resize) |
--------------------------------------