which control to use ?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
kevin11
Posts: 101
Joined: Thu Aug 11, 2011 5:02 pm

which control to use ?

Post by kevin11 » Tue Nov 22, 2011 2:03 pm

Hi,

I want to display a chronology of historical events, running across the screen from left to right.
Covering a few thousand years, so that's a very very wide screen.
I've looked at the lesson concerning scrolling a large image, but my data isn't an image.

What control should I use which :
(a) can handle a huge width
(b) can ask LC to fill in data when needed, rather than have it all on the card (similar to a datagrid method)
(c) can contain linked text, buttons, etc.
I was thinking perhaps the scrolling field, but not sure that that object can ask for a fillin as required. But perhaps look at the scrollbar value and create content on the fly ?
Or is there some other LC object I should be thinking about ? Or is the datagrid the way to go ?

Hoping to be pointed in the right direction before I go down a dead-end route...

Thanks

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Location: California
Contact:

Re: which control to use ?

Post by dglass » Wed Nov 23, 2011 3:44 am

You could do a couple of things:

1. a chart/graph - I do something similar where the chart is a set width and I provide buttons to scroll the dates. When the user advances the date I query the data again (a db backend), and redraw the graph with new start and end dates.

2. a group that has locked size and position - as you add items (labels, or shapes I would guess?) if they are placed beyond the bounds of the group, it (the group) will get scrollbars so the user can scroll to see the added items.

kevin11
Posts: 101
Joined: Thu Aug 11, 2011 5:02 pm

Re: which control to use ?

Post by kevin11 » Wed Nov 23, 2011 11:01 am

Thanks for these ideas - I hadn't thought of the first.

If I set up a group, by placing items outside the group I take it you mean the new items are part of the group, but out of sight. Hence the scrollbars ?

If I do this, the next question is - how much memory gets used up by a group with a lot of items - is the ram usage based on group width x group height x bitdepth, or are the items within a group just stored as coords and item-types, if you see what I mean. I'm asking really if the memory usage is the same as having a large image, I'm hoping not.

Thanks

Kevin

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Location: California
Contact:

Re: which control to use ?

Post by dglass » Wed Nov 23, 2011 4:13 pm

Yes, part of the group, but out of sight (beyond the bounds of the group).

No idea about memory usage.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”