Hi All,
I want to create many rectangles on a canvas , and as I drag I want to see the outline of the rectangle, on mouse up I want the rectangle to be displayed on the canvas with a fill color. The canvas already has a backdrop. So when I draw the second rectangle, I want the first rectangle and the backdrop to be present(I mean save the previous picture).
Next , after the rectangles are drawn, when i click on the already drawn rectangle, I should be able to resize it ( either make it big or small) , when clicked on the down rightmost corner or top leftmost corner.
Any help is appreciated .Thanks in advance
Divya
Xojo comes with a lot of example projects, have a look at them, especially the Canvas Drag Rect example and the Canvas Draw Drag example.
I would also strongly recommend the SuperDraw article in xDev 12.5
I agree with Markus.
The superdraw example gives you exactly this, and a lot more besides
Its quite old now, and may struggle to be opened, but:
https://dl.dropboxusercontent.com/u/992591/REALbasic/Forum/superdraw6.zip
Use the superdraw new.rb file
Add a UTI before running it.
Click the new rectangle button.
Then try resizing it.
Hi Markus,Jeff
Thanks for all the help. This is exactly what I needed.
Thanks & Regards
Divya