Scrolling field with buttons

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: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
shoshinsha
Posts: 35
Joined: Fri Jul 18, 2014 5:17 am

Scrolling field with buttons

Post by shoshinsha » Wed Sep 03, 2014 8:53 am

Is it possible to add buttons/images on the scrolling field list?

For example:
---------------
List A [>]
---------------
List B [>]
---------------
List C [>]
---------------
...

where [>] is an arrow-button.

Is it also possible to add 2 lines per list? E.g.,
---------------
List A
some descriptions...
---------------
List B
some descriptions...
---------------
...

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Scrolling field with buttons

Post by jmburnod » Wed Sep 03, 2014 11:14 am

Hi shoshinsha,
Is it possible to add buttons/images on the scrolling field list?
I think yes but using groups is a best way.
You can have a group with all objects you want: fields, buttons, images and also groups. 8)
Best regards
Jean-Marc
https://alternatic.ch

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Scrolling field with buttons

Post by Klaus » Wed Sep 03, 2014 1:05 pm

Hi shoshinsha,

1. welcome to the forum! :D

2. What Simon said!

3. You can add images to any field, see "imagesource" in the dictionary, but not buttons!
But one can script a field that way, that the images act like buttons.

4. For a real cool user experience, use a DATAGRID of type FORM.
But beware, Datagrids are the most complex objects in Livecode and definitively NOT beginners stuff, especially the FORM tpye.
Sad, but true! 8)

5. Livecode list fields can only display ONE line of text!


Best

Klaus

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

Re: Scrolling field with buttons

Post by dunbarx » Wed Sep 03, 2014 3:40 pm

Hi.

What Klaus said. Without using a data grid, you can create imageSource characters that look like buttons in a list field. They will scroll with the list. You can determine the clickLine where the user clicked, and in that way determine which "button" was clicked. You may need the clickLoc as well, so that you can determine whether the user wanted to click on a "button" as opposed to merely on the line. Then you can write a mouseUp handler for the field that will act on each "button" as you wish.

You can arrange the "buttons" in alternate rows, so that your secondary information will appear below each one.

This will be a hill of fun. Do you know how to start? Write back after you get stuck.

Craig Newman

Post Reply