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 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.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!

Article Preview


Buy Now

Issue 7.6

COLUMN

Drag-n-Drop

Supporting dragging and dropping in your app

Issue: 7.6 (September/October 2009)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 30,918
Starting Page Number: 40
Article Number: 7611
Resource File(s):

Download Icon 7611.zip Updated: 2009-09-01 11:35:03

Related Link(s): None

Excerpt of article text...

The ability to drag data around in applications -- and even between applications -- is so basic it's easy forget how much work goes on behind the scenes to make such magic happen. REALbasic supports some drag-and-drop automatically, such as dragging text within text fields. But if you want your app to support more: accepting files dropped onto your app's icon or windows, or moving text, pictures, or custom data between interface elements in your program, you'll have to do some extra work. If you're new to programming or REALbasic how you do some of that may not be obvious, so today we're going to explore how to add drag-and-drop to your app.

The basic steps involved in supporting drag and drop are simple. First you prepare an interface element by setting it up to allow drops of a certain kind (i.e., text or files). Then you add code to do something with the drop (what that is, exactly, varies with the kind of data dropped and the abilities of your specific app).

If you are creating the drag, not just receiving a drop, you'll need to prepare the drag first.

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