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 focus (edit/click). In this example particularly see how we use Validation Formula on Name to force the tab order i.e. the focus to be set to Address instead of the button that is the normal next in the tab order.
This sample is to show how one can use Labels for messages with SetLabelText() - SetLabelText() allow you to use Lables as "virtual" fields. This is a great benefit as Labels are transparent and can then be placed on top of Images etc. They are not part of the data schema so you will not interfere with the data update order either.
We also want to show how you can use SetState() to write protect fields and enable forms based on either an action or a derivation/rule.
We use SetLabelText() and SetColor() in a combination to change messages and we use SetState() to swap save buttons etc.
Have a look and try it yourself.