Example Projects

Go to Page 2

I have found that, where REALbasic is concerned, I learn best by examining examples of working projects to see how they function. Here are descriptions of some example projects you can download. The code of each project is heavily commented to help you understand what is going on.

EG.
// open the image file then display it in Canvas1
thePic = f.OpenAsPicture
Canvas1.backdrop = thePic

To learn from these example projects I suggest the following stategy (but you may want to adopt your own approach):
1. Download the project
2. Double-click the project file to open it in REALbasic
3. Run the project to see what it does (choose Run from the Debug menu)
4. Quit the running project
5. Choose a particular feature of the project to examine (eg. clicking a button displays a picture)
6. Examine the code and comments in any objects that you think might be related to the feature (eg. a pushbutton, a canvas, a window, etc.) to figure out how the program feature works.
NOTE: Every window code editor has a "Notes" section in the list on the left of the code editor window. Be sure to check for any notes in window code editors when you open them.

EXAMPLE PROJECT # 1
Font Browser:

This project demonstrates how to make a simple font viewing utility.
Download this project (.zip)

EXAMPLE PROJECT # 2
Picture Viewer:

This project demonstrates how to display pictures in a canvas and how to use a timer to run a simple slide show.
Download this project (.zip)

EXAMPLE PROJECT # 3
Folder Viewer:

This project shows how to make a browser for viewing images from a folder and how to scale pictures to fit into a canvas.
Download this project (.zip)

EXAMPLE PROJECT # 4
Picture Scaler:

This project shows how to scale and center an image when a window is resized.
Download this project (.zip)

EXAMPLE PROJECT # 5
URL Lister:

URL Lister shows how to create, edit, and save a list of URLs. You will see how to save the data from a two column listbox to a text file and how to retrieve that data from the saved file. Use of control binding and the ShowURL method are demonstrated.
NEW: URL Lister now demonstrates how to search multiple columns in a listbox.
Download this project (.zip)

EXAMPLE PROJECT # 6
High Score Manager:

This project demonstrates one way to manage a high scores list. In its present form it keeps track of 10 high scores but it can be easily modified to accommodate any number of high scores.
Download this project (.zip)

EXAMPLE PROJECT # 7
Designer Grid:

This project demonstrates how to draw a grid on a canvas and how to color in squares in various colors. It could be handy for cross-stitch, beading or other pattern making.
Download this project (.zip)

EXAMPLE PROJECT # 8
Free Space:

This project demonstrates how to use an AppleScript to determine the amount of free space on your hard drive.
Download this project (.zip)

EXAMPLE PROJECT # 9
Field Validation:

This project demonstrates how to check a field to see if it contains any characters not in a specified set of characters. It also checks to see if the field has nothing but spaces in it.
Download this project (.zip)

EXAMPLE PROJECT # 10
Listbox Printing:

Find out how to print the contents of a two column listbox. This project also shows how to print multiple pages.
Download this project (.zip)

EXAMPLE PROJECT # 11
DropNamer:

Shows how to get a program to recognize when a file is dropped on its icon in the finder and how to repond to the drop.
Download this project (.zip)

More projects...