Handling Multiple Windows

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Handling Multiple Windows

Post by billworld » Thu Nov 24, 2011 7:15 pm

I've been away from LiveCode for a while but am contemplating using it for an app I'm considering recoding. Of prime consideration is whether I can achieve the following required window handling and behaviors. Is this possible in LC5? What are best practices and/or examples for achieving this?

Thanks

Bill

------------------
Window Handling and Behaviors Requirements

1. Have multiple windows open, each representing a different record from a database

2. Shift select multiple windows and apply a colored border halo effect around the edge of all selected windows (in addition to a special affect applied to the current window in focus)

3. Drag current window in focus on top of other window. If multiple windows are selected (see item 2) show a bubble showing the current number of windows selected under the point of mouse click and maintain image while dragging.

4. Save position coordinates of windows when closing window or shutting down application and re-establish window position for specific record in the database when accessed again.
------------------

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Handling Multiple Windows

Post by Mark » Fri Nov 25, 2011 1:04 pm

Hi Bill,

I have an external that makes such things possible, but I'm not allowed to redisitribute it.

A bubble would probably be a window shape.

Saving window locations is easy. Just write the locations/rects to a preferences file and load next time.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Handling Multiple Windows

Post by jacque » Fri Nov 25, 2011 7:47 pm

1. Have multiple windows open, each representing a different record from a database
Built in and pretty easy. You can have as many windows open as you like.
2. Shift select multiple windows and apply a colored border halo effect around the edge of all selected windows (in addition to a special affect applied to the current window in focus)
This could be scripted but you'd probably need to settle for a colored border with only a partial halo effect if you want to use native features. You could put a graphic around the edge of the card and show/hide it to simulate a border. It would be possible to assign some of the graphic effects to give a halo effect on the inside edge. I'm not sure that would work completely on the outside edge.
3. Drag current window in focus on top of other window. If multiple windows are selected (see item 2) show a bubble showing the current number of windows selected under the point of mouse click and maintain image while dragging.
Scriptable. You'd need to create a stack with a bubble custom windowshape, with a field on the card that displays the number. Trap the system messages that tell you when a window is dragged and move the bubble window to the global mouse location repeatedly until the drag stops.
4. Save position coordinates of windows when closing window or shutting down application and re-establish window position for specific record in the database when accessed again.
Very easy, as Mark said.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Handling Multiple Windows

Post by Mark » Fri Nov 25, 2011 8:01 pm

Hi,

I would be slightly careful in assuming that moving windows can be scripted. Yes, this is possible, but if you want to move windows simultaneously, you might find the result somewhat wobbly.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

billworld
Posts: 188
Joined: Sat Oct 25, 2008 12:32 am

Re: Handling Multiple Windows

Post by billworld » Fri Nov 25, 2011 8:53 pm

Thanks for the detailed replies. I'll soon begin digging in on this.

Best,

Bill

Post Reply