List Filed

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
phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

List Filed

Post by phaworth » Sat Jul 04, 2009 4:23 am

Making good progress with Revolution. I've connected to an SQLite database and retrieved records form it and shown them in a list but have a couple of questions.

First, the list field was created with 5 columns in it and I only need two. I've searched the list field properties and can't find anywhere to specify the number of columns. Where can I do this?

Second, most of my database entries display in the list OK but a few don't. I think the common factor is that the ones that display incorrectly include a comma in one of the fields I'm displaying. How can I overcome this?

Anticipating the next issue, I would like to be able to double click on a row in the list and have details of that entry displayed in several fields outside the table. Is there a "double click" message? If not what alternative mans are there for me to display the details of a row selected in the list.

Actually, as a follow on from that, where can I find a list of all the message types that are available?

Thanks,
Pete

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Location: Philippines
Contact:

Post by shadowslash » Sat Jul 04, 2009 6:08 am

Hi phaworth,

I'm sorry but there is no "double click" message. Image However, thee is this very handy mouseDoubleUp and mouseDoubleDown message that you can use. Image
Parañaque, Philippines
Image
Image

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Post by Janschenkel » Sat Jul 04, 2009 6:50 am

To see the built-in event messages, open the Dictionary (there's a button right in the toolbar, or you can use the Help menu); then expand the item 'Object' in the left-hand list, and select the type of control whose event messages you want to check; finally use the filter field in the upper-right corner to narrow things down to "message" - et voilà, the dictionary now only shows the event messages for that specific control.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Jul 04, 2009 12:50 pm

Hi Pete,

You can change the tabstops in the table pane in the property inspector. For example, setting the tabstops to 200 will create a (seemingly) infinite number of columns of 200px wide. Setting the tabstops to 50,100,50 will create three columns of 50px, 100px and 50px wide.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Post by phaworth » Sat Jul 04, 2009 5:09 pm

Thanks Everyone for the responses. I'm converting over form another development platform that had zero discussion group presence so it's great to have it available for Revolution.

The cause of my problem with fields including commas was nothing to do with Revolution. I imported my data from a .csv file and didn't correctly enclose the text fields in quotes so the data was not loaded into the db correctly.

Thanks for the info on mouse click events, tab stops and events in general.

I tried specifying tab stops in the Property Inspector to 30,50,200. That deals with the three columns I need but I still see vertical lines in the list after the 3rd column - they appear to be 200 px apart. I'm sensing that maybe I need to set the final tab stop to a value that takes it over to the right edge of the list, or resize the list so it is just wide enough to hold the 3 columns or increase the font size to achieve the same goal. Am I on the right track?

I think I am also about to run into some formatting issues. I see that all the columns are left justified but one of them is a number that I would like to be right justified. I know there are justification options in the property inspector but looks like they apply to the whole list not just a column. Maybe I should be using the Data Grid object instead?

Thanks again for the help.

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Location: Philippines
Contact:

Post by shadowslash » Sun Jul 05, 2009 6:29 am

Yes, DataGrids are the best way to do it!
Parañaque, Philippines
Image
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”