How do I 'exit' a field?

Hi,
this may be a silly/simple question, but how do I ‘exit’ a field, i.e. the opposite of requestFocus??
I don’t specifically want to go to another field, just cause a pop-up on a field to go away
(I have an ‘onAction’ event attached to a combobox value list in a table view row which makes stuff happen when the user choose an item from the value list, but the value list stays ‘popped up’ whilst all this is going on and doesn’t disappear when it is finished…)
[databaseManager.saveData ( ); does not seem to do it, thought it might…]
Thanks
Rafi

Hi Rafi

There may well be a more elegant way but you could create a small transparent Label then ‘reqeustFocus’ on it to move away from your field.

HTH

If I remember correctly there should be a “focusNextField” function somewhere…

Hi guys,
@Graham - thanks for that idea, but it’s not the ‘correct’ way ;-)

@Nic - there is a focusField & focusFirstField, but not focusNextField

@Servoy - maybe you can add a ‘focusLost’ function, or ‘exitField’ function ???

Thanks

Rafi

You can use focusField(name) in combination with getTabSequence() to move the focus on the next field.

@Nic but Rafi said he didn’t want to go to another field

@Rafi I know - but it works …

I am with Graham on this. As far as I know putting the focus on another element is the only way to remove the focus from the current element.
Rafi, I suggest you file a feature request for this in Jira.

You could try this (at least for 5.2 it works)
currentcontroller.readOnly = !currentcontroller.readOnly;
currentcontroller.readOnly = !currentcontroller.readOnly;

A switch of controller readOnly state force the field to loose focus like if it needed to save (databaseManager.saveData())

Hi,

ROCLASI:
I am with Graham on this. As far as I know putting the focus on another element is the only way to remove the focus from the current element.
Rafi, I suggest you file a feature request for this in Jira.

Great idea! I have added a feature request

If anyone else think this might be useful, or wants to add their comments/votes, please do

@ everyone else that has replied, thanks, I will ‘play’ (until my new feature gets added of course :lol: )

Thanks
Rafi

Seems there was already a support request…

:)

Rafi