My app allows a user to enter text into a field and also to change the background colour. When a dark colour is chosen, my script changes the foreground colour to white to make it more readable. If the user selects a colour before entering any text, all works as expected (e.g. a red field with white text).
However, if the user enters text before choosing a colour, the background changes as expected but the text disappears. Text typed in at that point does appear as white (or black in the case of light colours). Changing just the background colour does retain the text -- it is only a change in foreground colour that deletes it. In the IDE the text does not get deleted -- only in the simulator and on an iPad.
So I tried storing the text in a variable, then putting it back in after the colour changes. But it simply does not appear even though I have proved that the variable does contain the text.
So, any clues what is happening here?
TIA
Don
Setting foreground color deletes text in a field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Setting foreground color deletes text in a field
Hi Don,
welcome to the forum!
Best
Klaus
welcome to the forum!

Not without taking a look at your script(s)!grovecat wrote:So, any clues what is happening here?

Best
Klaus
Re: Setting foreground color deletes text in a field
Hi Don,
I don't see that. Works alright if I understood correctly. Tested with Livecode 5.5 Simulator, Xcode 3.2.5 MacOSX 10.6.8 for iOS version 4.2
Could you post a simplified stack that shows your problem?
Kind regards
Bernd
I don't see that. Works alright if I understood correctly. Tested with Livecode 5.5 Simulator, Xcode 3.2.5 MacOSX 10.6.8 for iOS version 4.2
Could you post a simplified stack that shows your problem?
Kind regards
Bernd
Re: Setting foreground color deletes text in a field
The gremlins are getting at me. I made a very simple stack to just do what I described and it works on the simulator.
Obviously I should have done that first before posting a question - sorry.
I must have some other factor interfering in my app, so I'll have to track it down.
Thanks for the responses.
Cheers
Don
Obviously I should have done that first before posting a question - sorry.
I must have some other factor interfering in my app, so I'll have to track it down.
Thanks for the responses.
Cheers
Don