Article Preview
Buy Now
FEATURE
Better Examples—ListBox Part 3
From Ooops! to OOP with the ListBox
Issue: 18.5 (September/October 2020)
Author: Markus Winter
Author Bio: Markus is a Molecular Biologist who taught himself REALbasic programming in 2003 to let the computer deal with some exceedingly tedious lab tasks. Some call it lazy, he thinks it smart. He still thinks of himself as an advanced beginner at best.
Article Description: No description available.
Article Length (in bytes): 34,682
Starting Page Number: 28
Article Number: 18503
Resource File(s):
project18503.zip Updated: 2020-08-31 22:37:24
Related Web Link(s):
e 17.4 (http
Excerpt of article text...
Last time we laid out what we want to achieve and how, and explained what an interface is and how it solves three problems at once for us. So this time we'll get straight into the project.
The first thing we do after all this talking about
interfaces is to create one, so add an interface to a new project (menuInsert
and chooseClass Interface
) and rename it toCanDrawItself
(and yes, I settled on a shorter and better name for the interface). Add the following empty method to it (in effect you are adding only the signature of the method):
Public Sub Draw(g as Graphics, whatToDraw as String)
End Sub
...End of Excerpt. Please purchase the magazine to read the full article.