Simplicty and flexibility!


Function::Internal

SetFocus
SetFocus("ObjectName")
SetFocus(FieldWithObjectName)
retval := SetFocus("CustomerName") .


To move the cursor/focus to an object. This function will move the focus to any object that can take input/action. You can use this to control the tab order of your app depending on values inputted in fields etc.

This has been a focus long wished for as it will give you complete control on the input order of your form. Combine with SetState(Show/Hide/Enable/Disable and Clicked) to give the best user experience possible.

Parameters


ObjectToReceiveFocus: Text

The object that you want to give the focus too.

Returns/Result


Nothing

Examples


Reference

When the SetValue() function is implemented in a couple of days, the Keystroke CDF lovers will get competition.

To be able to direct the next action/input from the result of a previous have been a wished for functionality in DataEase "for ever", but for some reason the resolution has not been quick in arriving...

For those of you that have delved into the obscure and dangerous way of OML know there is a Method called "Select". Promising.... But first you discover that nothing happen, and when you check the documentation:

Select


Not implemented in 6.0. When implemented, Select will select an object - essentially gives focus to that object.

Turns out that it was never implemented later either.... We even checked if our "Big Brother" had fixed it in their DataEase aka Ffenics ;-), with the same result both in the program and the help file, and they won't fix it for a while because it says "Not implemented in 6.0" there too, and they have only gotten to 1.6...

Ok, enough fun. As you might be aware of now, OML is not the way forward for DataEase, so we try to implement the most "useful" features as functions in DataEase 8, so it will be more "accessible" to the wider community. OML is implemented with the same flair, risk aversion and shoddy attitude that gave us the DFW DQL. It was a great idea, but as many other "great" ideas in DFW, it was not followed up by great work, and eventually left like a couple of dirty socks on the bathroom floor.

If you don't already use it, forget about it, which lead me back onto the matter at hand (I love this Blog formt...:-). SetFocus(), I am sorry but there is not much to say, that hasn't already been said in the Subject Line.

Function that set the cursor/focus on any field/button that you want, it will return....NOTHING!
Why? All the new Manipulation functions return nothing, this way you can use them as part of any formula/derrivation.

concat("One","Two",SetFocus("Field 22") or in a numerical field... Field1+SetFocus("Field 22").

Fun?

See Also


On the forum about SetFocus

SetFocus() in subform, doesn't work?

Does the SetFocus in a sub form work? I managed to get the SetValue but not the SetFocus.josefLost Focus Event of the Barcode Fielddefine "ACT" Text .act := SetValue(concat ("QTY#", RowNo) , "1" ) .ACT := SetFocus...

Product: Dataease [{8}]FIVE. Written by Josef 14/08/17 at 12:49:43

Re:SetFocus() in subform, doesn't work?

I remember something like this but that was ages ago. What version is this in? This problem was fixed quite a long time ago. Is the barcode f...

Product: Dataease [{8}]FIVE. Written by DataEase 14/08/17 at 12:51:07

On the blog about SetFocus

New Function in 8 - SetFocus() - Move the cursor/focus to any Field/Button (Ver. 8.0.0.1147)

When the SetValue() function is implemented in a couple of days, the Keystroke CDF lovers will get competition. To be able to direct the next action/input from the result of a previous have been a wished for functionality in DataEase "for ever", but for...

Product: Dataease [{8}]FIVE. Written by DataEase 26/10/12 at 09:43:11

Re:New Function in 8 - SetFocus() - Move the cursor/focus to any Field/Button (Ver. 8.0.0.1147)

I know that we can already set any Tab order we want. I use this to fill in a form. I have tricked it a little so that it can follow different paths through my form depending on the starting point, but what I am struggling with is to "point" on the right...

Product: Dataease [{8}]FIVE. Written by David Mills 01/11/12 at 16:21:41

DataEase 8 - Small Sample to show off SetState(),SetFocus(),SetColor(),SetLabelText() (Ver. 8.0.0.1281)

This is just a small sample to show off SetState() -  Hiding/showing/disabling/enabling of fields/buttons and other GUI objects, SetFocus() - set focus on any field or button etc that you want to have the...

Product: Dataease [{8}]FIVE. Written by DataEase 27/04/13 at 09:17:21

Update Functionality DataEase 8 - SetValue(), SetState(), SetColor(), SetFocus() ObjectNumber Added (Ver 8.0.0.1306)

One challenge that has been present since OML was introduced and one could start to manipulate GUI object directly is to manipulate different Rows/Records in a Subform etc.Record objects in Subforms are clones, and hence don't have their own u...

Product: Dataease [{8}]FIVE. Written by DataEase 18/06/13 at 22:08:56


dg3_HelpView