Get line number in List Field - Newbie Question

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
benoestrada
Posts: 27
Joined: Thu Jan 31, 2008 12:30 am
Location: Mexico
Contact:

Get line number in List Field - Newbie Question

Post by benoestrada » Fri Feb 08, 2008 4:44 am

Hi,

I'm new to RunRev and have this question:

I have a list field object and would like to know the line number of the selected item.

Say I have
A
B
C
D

And click the mouse on C, what is the code to know that C is in line 3 of my field?

Thanks for your time and ideas.

beno

benoestrada
Posts: 27
Joined: Thu Jan 31, 2008 12:30 am
Location: Mexico
Contact:

Post by benoestrada » Fri Feb 08, 2008 5:34 am

Hi

I got it.

Dismiss this thread.

Andycal
Posts: 144
Joined: Mon Apr 10, 2006 3:04 pm

Post by Andycal » Sat Feb 09, 2008 2:58 pm

How did you do it?

Klaus
Posts: 13828
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Post by Klaus » Sat Feb 09, 2008 6:45 pm

Hi Andy,

you can retrieve info from list fields like:

...
the selectedtext of fld "list field"
## well, you guess, that returns the text the user selected/clicked :-)
...
the hilitedlines of fld "list field"
## will return the number of the selected line


Best

Klaus

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”