Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 20 in printed book and digital formats -- plus a one-year subscription (beginning with 21.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Recent issues

Article Preview


Buy Now

Issue 4.6

FEATURE

Designing a Visual Layout Editor

Part One

Issue: 4.6 (July/August 2006)
Author: Charles Yeomans
Author Bio: Charles is the author of "I Declare: Calling External Functions in REALbasic", available online at http://www.declareSub.com/
Article Description: No description available.
Article Length (in bytes): 34,927
Starting Page Number: 25
Article Number: 4610
Resource File(s):

Download Icon 4610.zip Updated: 2006-10-10 09:47:41

Related Web Link(s):

http://www.declareSub.com/

Excerpt of article text...

Adding visual layout capability to applications is a complex task. As evidence for this, you only need to leaf through the book "Design Patterns" to see that several of the patterns have their origins in designing visual layout editors. In this two-part article, we tackle the design of a simple layout editor. More precisely, we will develop a mockup of a layout editor that I hope will suggest how one might go about the design of a visual layout editor, and illustrate some technique.

Getting Started

As a model for the look-and-feel of our layout editor, we look to the REALbasic IDE. We will emulate its single-window design. Starting from a new project, rename Window1 to LayoutEditor. Open its editor, and a Listbox named WidgetListbox, and a Canvas named LayoutCanvas, arranging them as in the REALbasic IDE (see Figure 1).

We will want to be able to double-click the LayoutCanvas, so we implement a quick DoubleClickCanvas class subclass of Canvas. Here are the properties, methods, and events to add to DoubleClickCanvas.

Private LastMouseUpTime as Integer

...End of Excerpt. Please purchase the magazine to read the full article.