Hi !
Table field works the wrong side :
On a card I put 1 table field and 1 button
the script of the button :
on mouseUp
if the label of me is "Change price" then
set the locktext of fld "price" to false
answer "Write new data and click on Register"
set the label of me to "Register"
else
set the label of me to "Change price"
set the locktext of fld "price" to true
end if
end mouseUp
This script do not works well
on mouseUp
if the label of me is "Change price" then
set the locktext of fld "price" to true
answer "Write new data and click on Register"
set the label of me to "Register"
else
set the label of me to "Change price"
set the locktext of fld "price" to false
end if
end mouseUp
this script works but only if I don't click on the field
If I click on the field or change data I must repeat twice the job
Normal ?
Table field is crazy
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
I'm a newcomer, so apologies if this isn't what you wanted ...
I think the problem is that "locktext" works with an ordinay scrolling field, but not with a table field.
If you check the table's "disabled" property (in Basic properties), and change "locktext" to "disabled" in your first piece of code, it should work.
Pete
I think the problem is that "locktext" works with an ordinay scrolling field, but not with a table field.
If you check the table's "disabled" property (in Basic properties), and change "locktext" to "disabled" in your first piece of code, it should work.
Pete
Hi undelouest and bonbon,
You might want to use this:
You should never set the lockText of a table field to false. This can cause unexpected results.
Best,
Mark
You might want to use this:
Code: Select all
set the cRevTable["cellEdit"] of fld 1 to false
set the cRevTable["cellEdit"] of fld 1 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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 9
- Joined: Sun Oct 05, 2008 2:22 pm