Issue: 7.5 (July/August 2009)
Author: Marc Zeedar editor-at-rbdeveloper.com
Article Description: No description available.
Article Length (in bytes): 13,576
Starting Page Number: 46
RBD Number: 7515
7515 project.zip Updated: Wednesday, July 1, 2009 at 1:24 PM
Related Link(s): None
Known Limitations: None
Excerpt of article text...
Beginners are often intimidated by the canvas control. It took me a while before I did much with it. A canvas is literally blank, an empty canvas if you will, ready for you to paint with code. So what do you do with it?
The most common use for a canvas is to display a picture. This is easily accomplished by simply dragging a canvas to a window and setting the canvas' backdrop property to a graphic you've imported into your project.
This technique is useful for displaying something simple like an application's logo or a background picture, and it has the key advantage of displaying within the IDE so you can see the result without having to compile and run your application.
But it's severely limited. The picture is a fixed size and is non-interactive (that is, it does not respond to mouse clicks or anything else).
When you get a little more advanced, you might figure out that instead of displaying a picture via the backdrop property, you're much better off drawing the picture manually (via code) within the canvas' paint event.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.