Hi all,
I've adapted Trevor's excellent code to an interface group that contains a field that should have placeholder text.
The code is shown as a lesson: https://lessons.livecode.com/m/4071/l/6 ... -behaviors
This works well... except when opening the stack and the field is empty (ie it just displays the placeholder text).
The placeholder text is displayed as intended, but clicking or tabbing into the field doesn't make the placeholder text go away and inserts itself into whatever you type.
To make it work properly, i have to enter value, delete it, focus on nothing/something else and then enter text again - after that it continues to work as intended until stack is closed, but recurs on re-opening (if the uText is empty).
There's something about openField that doesn't fire on opening the stack?
Any suggestions?
Placeholder text, behaviours, openField
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Placeholder text, behaviours, openField
Nevermind...
I abandoned Trevor's code in the above lesson as i can't seem to work around the issue that the field needs to be manually modified, exited and re-modified to trigger the behaviour... something about it just didn't work well and modifying the text field in script didn't work either.
Instead, i used Jacque's very helpful code from a related discussion here: viewtopic.php?f=7&t=35408&start=15#p202045 (thank you for sharing Jacque!!)
All works well now.
This was to update a combobox replacement i've previously posted on sample stacks/liveCodeShare, i'll update soon...
S.
I abandoned Trevor's code in the above lesson as i can't seem to work around the issue that the field needs to be manually modified, exited and re-modified to trigger the behaviour... something about it just didn't work well and modifying the text field in script didn't work either.
Instead, i used Jacque's very helpful code from a related discussion here: viewtopic.php?f=7&t=35408&start=15#p202045 (thank you for sharing Jacque!!)
All works well now.
This was to update a combobox replacement i've previously posted on sample stacks/liveCodeShare, i'll update soon...
S.