set multiline visible or editable to "boolean"

This is the place to discuss anything relating to MobGUI

Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21

Post Reply
Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

set multiline visible or editable to "boolean"

Post by Jellobus » Sun Mar 16, 2014 12:16 pm

Hi, :)

I am stuck with a script to make multiline visible set to true or false..and make it editable to true or false... What I found was the hidden multiline group became visible automatically when card opens. I tried with scripts below but they were not working..

Code: Select all

mobileControlSet "field", "visible", "false"
mobilecontrolSet "field", "editable", "false" 
Also can I make a multiline group hidden by touching(mouseUp) after text input? I think text should be locked before a mouseUp handler takes action...Its just my guess..

Code: Select all

on mouseUp
    hide me 
end mouseUp
Any suggestions or advice will be appreciated!

Cheers,

Louis

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: set multiline visible or editable to "boolean"

Post by dave.kilroy » Sun Mar 16, 2014 3:59 pm

Hi Louis

I've just checked in the dictionary and see that the 'true' and 'false' variables are used without quotes as in:

Code: Select all

mobileControlSet tControl, "visible", true
If you don't want to show the field when the card opens I suggest you only create it when you need it as it sounds like you are creating it as the card opens which is too early for you. The other thing to watch out for is order - could it be that your 'hide and disable' code is firing too early and is being overridden?

I've never used a multiline but my experience of other native controls would lead me to expect it to 'float' above all other controls on your app, and even if you set its 'visible' to false it might still respond to user's touches and mess things up for you - safer to both hide it and move it off screen - or I guess you disabling it whilst hiding it is your approach to getting rid of it while it's not wanted?

As regards hiding a group after a mouseUp that should be OK but the same thing applies to how native controls float independently and you may need to both hide and move it
"...this is not the code you are looking for..."

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: set multiline visible or editable to "boolean"

Post by Simon » Sun Mar 16, 2014 11:00 pm

Hi Louis,
I understand the "editable false" on Android has been depreciated and only works on older devices.
For things like credits, instructions etc. I think the way is using images now or maybe it's use a liveCode field.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: set multiline visible or editable to "boolean"

Post by Jellobus » Mon Mar 17, 2014 7:23 am

Hi Dave and Simon,

Now I understand how the multiline behaves..your replies are very informative. I will hide and move it and will combine a livecode field to apply editable function.
Thanks!! :D

Louis

Post Reply

Return to “MobGUI”