PDA

View Full Version : setEmptyText in formattedtextfield



lagouache
July 4th, 2020, 06:55
When using a stringfield I can use the setEmptyText method to define the empty text. This does not seem to work with formattedtextfield since it does not seem to inherit from stringcontrol.
Is there a way to define the empty text of a formattedtextfield ?

superteddy57
July 4th, 2020, 11:48
Have you tried using <empty textres=""> tag in the xml and then defined the resource in the strings? That's the method I stick with for most elements

damned
July 4th, 2020, 14:36
formattedtext fields are never empty.
I use something like:
if string.len(getDatabaseNode().getValue()) <= 8 then getDatabaseNode().setValue("<p>No Info</p>"); end

lagouache
July 4th, 2020, 21:21
Thanks for your ideas ! It gives me new ways to explore