Demo: scroller with A-Z index
Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Demo: scroller with A-Z index
I've been asked a few times of it's possible to have a scroller with the vertical A-Z index like the iPhone contacts app. This demo shows a similar set up using the following;
1/ The contact list: a native scroller with a text field.
2/ The index: a graphic with rounded ends and a text field.
The code is in the card script so that once the index has been touched, your finger doesn't have to stay on top of the index as you move up and down the screen. It works in the simulator and the device.
Depending on your needs, you could improve on this idea or re-engineer it using alternative controls. Hope it's useful as a starting point
John
Here it is running on the iPhone4
1/ The contact list: a native scroller with a text field.
2/ The index: a graphic with rounded ends and a text field.
The code is in the card script so that once the index has been touched, your finger doesn't have to stay on top of the index as you move up and down the screen. It works in the simulator and the device.
Depending on your needs, you could improve on this idea or re-engineer it using alternative controls. Hope it's useful as a starting point
John
Here it is running on the iPhone4
LiveCode Development & Training : http://splash21.com
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: Demo: scroller with A-Z index
You could also add the following code to the script of the 'Contacts' field;
An easy way to take an action when an entry is touched.
Code: Select all
on touchEnd pId
answer the value of the clickLine
end touchEnd
LiveCode Development & Training : http://splash21.com
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Demo: scroller with A-Z index
mobGUI keeps gettin better and better.
But this scroller looks like its only for i$hone.
Soooo jealous!
But this scroller looks like its only for i$hone.
Soooo jealous!
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Re: Demo: scroller with A-Z index
This helped a lot. However, I do have one question remaining.
How can I get this same effect if I have a list of data filling the scrolling field in the preopenstack event? For instance, I have data that is preloaded and could change. Any way I can add in the alphabet letters on the fly into my scrolling field in order to get this same effect?
How can I get this same effect if I have a list of data filling the scrolling field in the preopenstack event? For instance, I have data that is preloaded and could change. Any way I can add in the alphabet letters on the fly into my scrolling field in order to get this same effect?
Re: Demo: scroller with A-Z index
Does anyone know how to make this work if you're preloading data in the preopenstack? I have a database that I'm pulling from that I can't go in and put A, B, C, and so on into. Anyone got any ideas for a shortcut to make this work so that I can have that "quickjump" capability in the scolling field? Any feedback would be greatly appreciated. Thanks
Re: Demo: scroller with A-Z index
Just grab your database text and parse it to insert the A,B, C etc before you put it into the field? How much data is there?cenglish wrote:Does anyone know how to make this work if you're preloading data in the preopenstack? I have a database that I'm pulling from that I can't go in and put A, B, C, and so on into. Anyone got any ideas for a shortcut to make this work so that I can have that "quickjump" capability in the scolling field? Any feedback would be greatly appreciated. Thanks
Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: Demo: scroller with A-Z index
Might be out of context but
yesterday I was trying to populate a DataGrid on a card where the card wasn't open or loaded yet.
Once I loaded the card first then the script that populated the DataGrid worked.
Too many fumblings about on my part to be more specific.
hth
yesterday I was trying to populate a DataGrid on a card where the card wasn't open or loaded yet.
Once I loaded the card first then the script that populated the DataGrid worked.
Too many fumblings about on my part to be more specific.
hth
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.