Alternative to scrolling field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Alternative to scrolling field
At the moment I'm putting items into a scrolling field for a user to select an item, but I want it to look a bit better, with nice graphical up and down arrows etc.
Should I use buttons, text fields? (for the items in the scrolling field) - I'm sure both of these I'll manage to do but I'm just wondering if there is a better way?
Any examples would help as well.
Thanks,
Carel
Should I use buttons, text fields? (for the items in the scrolling field) - I'm sure both of these I'll manage to do but I'm just wondering if there is a better way?
Any examples would help as well.
Thanks,
Carel
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Alternative to scrolling field
Hi.
If you want graphic gadgets that scroll with the "field", why not use a datagrid. These take a little practice, but are very powerful.
http://lessons.runrev.com/m/datagrid
Craig Newman
If you want graphic gadgets that scroll with the "field", why not use a datagrid. These take a little practice, but are very powerful.
http://lessons.runrev.com/m/datagrid
Craig Newman
Re: Alternative to scrolling field
Use mouse down and drag.
Otherwise semi transparent buttons on the work pallette itself.
Hidden after a few seconds of non use, etc.
Otherwise semi transparent buttons on the work pallette itself.
Hidden after a few seconds of non use, etc.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Alternative to scrolling field
Thanks for the replies.
I took a screenshot of what I want to achieve - the buttons on the left as opposed to the scrolling text field on the right.
The blue button is what the "user selected" - although I've just changed the color for the example.
Using the text field is easy - I just put myText into field "textfield" whereas with the buttons I'm going to have to create all of them with code and "remove" the top button as soon as the user starts scrolling downwards past the last visible button (if there is more buttons down the list)
If I can use any other control to achieve this easier I would do that, but I don't mind doing what I explained here if that is my only option.
It is a Windows app btw.
I just had a thought - I could have a finite amount of buttons - say 10, and just change the contents as the user scrolls, and just hide buttons if there is less than 10 items in the list.
Thanks,
Carel
I took a screenshot of what I want to achieve - the buttons on the left as opposed to the scrolling text field on the right.
The blue button is what the "user selected" - although I've just changed the color for the example.
Using the text field is easy - I just put myText into field "textfield" whereas with the buttons I'm going to have to create all of them with code and "remove" the top button as soon as the user starts scrolling downwards past the last visible button (if there is more buttons down the list)
If I can use any other control to achieve this easier I would do that, but I don't mind doing what I explained here if that is my only option.
It is a Windows app btw.
I just had a thought - I could have a finite amount of buttons - say 10, and just change the contents as the user scrolls, and just hide buttons if there is less than 10 items in the list.
Thanks,
Carel
Re: Alternative to scrolling field
HUi Carel,
still not sure what you are after, but I would also recommend to use a datagrid
of type FORM with only ONE button in its template.
This way you do need need to create all the neccessary buttons yourself
Best
Klaus
still not sure what you are after, but I would also recommend to use a datagrid
of type FORM with only ONE button in its template.
This way you do need need to create all the neccessary buttons yourself
Best
Klaus
Re: Alternative to scrolling field
Yes, Dunbar and Klaus are correct.
Using a datagrid is definitely the go.
Datagrids are NOT intuitive to use.
Pretty much in any scripting language.
You must read thru and follow the data grid lessons.
The hyperlink Dunbar posted above is a general reference to datagrid lessons.
You will find if you follow these lessons you'll be able to accomplish tasks much faster than trying to figure it out yourself.
I would suggest starting here:
26382-how-do-i-work-with-checkboxes-in-a-data-grid
http://lessons.runrev.com/s/lessons/m/d ... -data-grid
and perhaps change the checkboxes to a button.
Then here:
http://forums.runrev.com/viewtopic.php?f=8&t=8532
http://ftp.runrev.com/forums/viewtopic. ... 77&p=61376
Be sure to post your queries here if you get stuck and before you get frustrated.
Using a datagrid is definitely the go.
Datagrids are NOT intuitive to use.
Pretty much in any scripting language.
You must read thru and follow the data grid lessons.
The hyperlink Dunbar posted above is a general reference to datagrid lessons.
You will find if you follow these lessons you'll be able to accomplish tasks much faster than trying to figure it out yourself.
I would suggest starting here:
26382-how-do-i-work-with-checkboxes-in-a-data-grid
http://lessons.runrev.com/s/lessons/m/d ... -data-grid
and perhaps change the checkboxes to a button.
Then here:
http://forums.runrev.com/viewtopic.php?f=8&t=8532
http://ftp.runrev.com/forums/viewtopic. ... 77&p=61376
Be sure to post your queries here if you get stuck and before you get frustrated.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Alternative to scrolling field
I think you can do it pretty simply without the overhead of a datagrid. Create and align the buttons. Group them. Then set the scroll of the group in your up and down arrow buttons.
If the number of buttons changes, you can add or remove them directly in the existing group, you don't need to re-create the entire thing each time.
If the number of buttons changes, you can add or remove them directly in the existing group, you don't need to re-create the entire thing each time.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Alternative to scrolling field
I think I'll just do it with the text field, and the way I imagine it in my head.
Can I upload 'n sample stack somewhere to get comments from you guys?
Thanks,
Carel
Can I upload 'n sample stack somewhere to get comments from you guys?
Thanks,
Carel
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Alternative to scrolling field
Jacque may be right. I reread the original post, and maybe I was off base with the idea that objects attached to each visible line tracked the scrolling list. Do upload the test stack. This might be easy...
Craig
Craig
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Alternative to scrolling field
Image sources in fields will scroll with the field, but in this case I think it would be more work than just scrolling a group.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Alternative to scrolling field
OK, here is the test stack.
BTW it is not a compressed file, just remove the ".rename.zip"
The whole exercise is not for functionality - the standard scroll field on the right works perfectly. The whole idea is to make it look better for example, but nice icons on the up and down buttons.
Any feedback, or an easier way to achieve the same would be appreciated.
Thanks,
Carel
BTW it is not a compressed file, just remove the ".rename.zip"
The whole exercise is not for functionality - the standard scroll field on the right works perfectly. The whole idea is to make it look better for example, but nice icons on the up and down buttons.
Any feedback, or an easier way to achieve the same would be appreciated.
Thanks,
Carel
- Attachments
-
- test.livecode.rename.zip
- (9.08 KiB) Downloaded 208 times
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Alternative to scrolling field
Hi Carel,
First quick reply...
add lock screen and unlock screen to your up/down btns.
way better looking.
Simon
First quick reply...
add lock screen and unlock screen to your up/down btns.
way better looking.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Alternative to scrolling field
Thanks Simon,
Never knew about it - looked it up in the dictionary.
I had a thought today - could one scroll a field with external (custom) buttons?
Carel
Never knew about it - looked it up in the dictionary.
I had a thought today - could one scroll a field with external (custom) buttons?
Carel
Re: Alternative to scrolling field
Hi Carel,
...
set the scroll of fld x to N
## where N is an integer, of course
...
Best
Klaus
sure, you can set EVERY property of objects in Livecode by script!carel wrote:I had a thought today - could one scroll a field with external (custom) buttons?
...
set the scroll of fld x to N
## where N is an integer, of course
...
Best
Klaus
Re: Alternative to scrolling field
Thanks Klaus,
Then this whole exercise was (not entirely) pointless. I'll explore some more...
At least I got some more experience and learned new things while doing this which is always a good thing.
Thanks,
Carel
Then this whole exercise was (not entirely) pointless. I'll explore some more...
At least I got some more experience and learned new things while doing this which is always a good thing.
Thanks,
Carel