split screen

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

split screen

Post by jalz » Sun Feb 26, 2012 11:35 pm

Hi all,
Im very new to LiveCode and am exploring a couple of user interface options for my application. One of the thoughts I have is to try and create a a native Apple type UI, with a resizable left hand pane with other objects within in, and on the right have the screen further divided horizontally so there are in fact two areas, a top and bottom.

Whats the best way to learn to do this type of app layout - any hints would be fab

Thanks
Jalz

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: split screen

Post by dunbarx » Mon Feb 27, 2012 2:19 am

When you say objects in the left hand pane, do you mean fields, buttons, images and scrollbars? The same for the top and bottom areas of your right hand pane?

There is a complex LiveCode object called a "dataGrid", complex in that it is an integrated group of standard objects with built-in behaviors and functionality. It works, very likely, in a way that you can use directly.

I am not sure this is a good thing. DataGrids are so seductive that many new LC users jump right in to them without really learning the nature of the very objects that comprise them. Nor do they put in the time, absolutely required, to learn the language, message mechanics and structure of LiveCode itself. Also, if you require independent resizability of both the vertical and horizontal dividers in your several panes, this might be problematic. I am no expert on datagrids.

I would advise you very strongly to make your gadget with basic objects first. This certainly can be done, and I don't even know what your underlying concept is at all. I do guarantee that it can be easily accomplished, and in a handful of different ways.

Write back often...

Craig Newman

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: split screen

Post by bn » Mon Feb 27, 2012 6:22 pm

Hi Jalz,
One of the thoughts I have is to try and create a a native Apple type UI, with a resizable left hand pane with other objects within in, and on the right have the screen further divided horizontally so there are in fact two areas, a top and bottom.
I made a stack that certainly is not a native Apple type UI but has the elements to do what you describe. Move the mouse over the dividers and the cursor changes, then you can change sizes of different panes.

I tried to write clean code (sort of) and commented the code.

Have a look
Panes stack.livecode.zip
(3.38 KiB) Downloaded 403 times
Kind regards

Bernd

jalz
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 340
Joined: Fri Sep 12, 2008 11:04 pm

Re: split screen

Post by jalz » Mon Feb 27, 2012 10:41 pm

Thanks both of you for replying, especially Bernd as your stack was EXACTLY what I was thinking of. Now I need to work out how you did this, and how I can implement this in my application as well as making sure each object within those areas are fixed and don't overlap

Thanks once again for giving me a head start :)

Jalz

Post Reply