Table field that won't lock

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
Troy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 38
Joined: Sun May 21, 2006 2:21 am

Table field that won't lock

Post by Troy » Wed Nov 28, 2007 6:52 am

I have a project with a table field, which I want to have list behavior, and I have the locktext set to true, however whenever I click a line it wants to go into cell-edit mode. How do I avoid this? I want the entire line to hilite, but do not want the table to be editable by the user, just single line selections.

I know this seems like it should be dead simple, and I'm sure I've done it before, but I can't seem to find the magic combination of properties which gets these results.

A little help please.

Troy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 38
Joined: Sun May 21, 2006 2:21 am

Post by Troy » Wed Nov 28, 2007 6:57 am

In the meantime, I guess I'm just switching it to a standard list field, with tabstops.

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

Post by Mark » Wed Nov 28, 2007 9:45 am

Hi Troy,

Create a normal field, turn on the horizontal and vertical grid, set the tabstops, and set locktext and listbehavior to true.

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

Troy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 38
Joined: Sun May 21, 2006 2:21 am

Post by Troy » Wed Nov 28, 2007 4:42 pm

Thanks Mark, that's what I did last night.

But I'm curious, what property is it in the "table" that makes it behave differently? No matter what I did, I couldn't seem to convert the table into having the same attributes as the normal field as described.

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

Post by Mark » Wed Nov 28, 2007 5:05 pm

Troy,

Choose the pointer tool, select the table field and try this in the message box:

Code: Select all

put the cRevTable["cellEdit"] of the selectedobject
It is not really straightforward, I know.

Actually, I never use Rev's table objects. I made my own table object and I adjust it as needed for my projects.

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

Troy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 38
Joined: Sun May 21, 2006 2:21 am

Post by Troy » Wed Nov 28, 2007 5:24 pm

Ah, I see. I hadn't realized there was a special custom property which was causing that behavior, though I was beginning to suspect it after toggling virtually every other property without result. :D

OK, now I know better. I suppose that cell editing behavior could be useful on other occasions - just not this time! Thanks for the info.

Post Reply