Show/hide field labels within the field

I trawled through the forum looking for this, apologies in advance if I didn’t find that it’s been discussed elsewhere.

I want to save on screen real estate by overlaying field labels in the corresponding fields like this
[attachment=1]Screen shot 2010-03-14 at 7.29.05 AM.png[/attachment]
I want to hide the label as the cursor enters the field; and show it again if the field is empty when the cursor leaves the field, like this
[attachment=0]Screen shot 2010-03-14 at 7.29.41 AM.png[/attachment]
I use a prefix convention of lbl_ for the labels and attach form methods for the onFocusGained and OnFocusLost events for each field

function HideFieldLabel(event) {
 	// On tabbing into a field, hide the in-field label
	var vElementName = event.getElementName();
    elements["lbl_"+vElementName].visible = false
}
function ShowFieldLabel(event) {
	// On tabbing out of a field, Display the in-field label if the field is empty
    var vElementName = event.getElementName();
    var vVal = controller.getDataProviderValue(vElementName)
    elements["lbl_"+vElementName].visible = !vVal // Don't show it if there's text
}

This works fine in SmartClient, but not in Webclient (Safari on a Mac when testing in Developer 5.1). In SC, clicking over the label/field trigger the field’s method, but in WC it doesn’t. I thought about putting the label behind the field and making the field transparent, but I need the field background for other things (highlighting fields that need attention).

Does anyone have a workable example, or any comments?

dont know if it is easy to also let this work that way in the webclient.

Way better would be if this would be supported nicely on the field level itself. (so displaying something for a null value)

You can already do this with converters. You could make a converter on the firstname field and if the db value is null return that label.
The only thing is that when a user goes into the field it should blank. (or select everything so that a user can easy overwrite it, this can be done with the property select on enter)

But nicer would be if servoy did this for you for example having a column property that says what to display on null… So that where ever you put that field it will print that.
You could make a feature request for this.

I haven’t met converters yet, looks like they will be lots of fun. Can you point me to some examples?
I’ll file a case for your nicer suggestion. Thanks!

+1 for me! :-)

are there any examples for converters? I’ve looked on the Wiki and this forum, can only see announcements.