SetState is a function that will make it possible to manipulate objects from a derivation/DQL without having to use OML properties. SetState will hide/show, enable and disable.
ClickObject which will remotely call the click event on a button or any other object. Very useful for controlling execution.
System Variables added in 1790.
We will use Setstate to set system variables in DataEase. First addition is Default Printer.
ObjectName (String) :
This is not the same as Column(Field) name. Object name is the name for the object in the GUI model and always need to be "quoted". "MyField", "MyButton" etc.
State (Number, "Number", "State"): This is the function you need to trigger:
"Hide", "0",0
hide the object.
"Show","1",1
show the object if it is hidden.
"Disable", "2", 2
disable the object. A field will be write protected and a button will not be clickable etc. Will not affect OML.
"Enable" , "3", 3
enable the object. Remove write protect and will enable buttons, tab controls etc to be clickable again. Will not affect OML.
"Click", "4", 4
ClickObject (Call Click Event on any object). If called for a button it will do the action and OML. WIll trigger OML on any object.
"MoveToFront"
Move the Object to front in the view i.e. it will be on top of all other objects. Ex. SetState("MyObject","MoveToFront")
"SendToBack"
Move the Object to Back in the view i.e. it will be behind all other objects. Ex. SetState("MyObject","MoveToBack")
System Version:
We also use SetState() to show ServiceWindows which is the new "toolbars" in DE8.6 onwards. These are 4 browser windows that can be utilised as part of your application as well.
SetState("ServiceWindow1","Show")
SetState("ServiceWindow4","Hide")
SetState("ServiceWIndow3","Refresh") -- refresh/reload content of service window.
Also see MoveObject()
Ex.
MoveObject("ServiceWindow1","L150","")
SetState() will manipulate ScreenObjects like fields, buttons etc (in practice everything).
format SetState("Object",State) returns empty string so it can be included in any function without interfering with result of formula.
SetState("Field",0) will hide.
SetState("Field",1) will show.
SetState("Field",2) will disable
SetStage("Field",3) will enable.
SetFocus(), SetValue(), SetStyle(), GetStyle(), GetValue(), SetLabelText()
Product: Dataease [{8}]FIVE. Written by Gregor Popp 01/05/13 at 23:15:57
Product: Dataease [{8}]FIVE. Written by DataEase 8 Development 02/05/13 at 06:59:46
Product: Dataease [{8}]FIVE. Written by Gregor Popp 05/05/13 at 23:43:20
Product: Dataease [{8}]FIVE. Written by DataEase Development 06/05/13 at 07:33:58
Product: Dataease [{8}]FIVE. Written by Graham Brown 17/07/13 at 17:48:28
Product: Dataease [{8}]FIVE. Written by DataEase Tech Support 18/07/13 at 08:21:39
Product: Dataease [{8}]FIVE. Written by Graham Brown 18/07/13 at 14:14:45
Product: Dataease [{8}]FIVE. Written by DataEase Tech Support 18/07/13 at 16:01:49
Product: Dataease [{8}]FIVE. Written by DataEase Tech Support 22/07/13 at 13:20:59
Product: Dataease [{8}]FIVE. Written by 25/11/13 at 19:38:12
Product: Dataease [{8}]FIVE. Written by Graham Brown 25/11/13 at 19:44:01
Product: Dataease [{8}]FIVE. Written by DataEase Tech Sup 26/11/13 at 07:30:28
Product: Dataease [{8}]FIVE. Written by George Washington 15/01/15 at 10:06:33
Product: Dataease [{8}]FIVE. Written by DataEase 15/01/15 at 11:06:55
Product: Dataease [{8}]FIVE. Written by George Washington 15/01/15 at 12:00:31
Product: Dataease [{8}]FIVE. Written by DataEase 15/01/15 at 12:33:57
Product: Dataease [{8}]FIVE. Written by Ken Roth 24/09/15 at 18:11:48
Product: Dataease [{8}]FIVE. Written by grohmann.papier@t-online.de 24/09/15 at 19:25:42
Product: Dataease [{8}]FIVE. Written by Ken Roth 25/09/15 at 02:45:30
Product: Dataease [{8}]FIVE. Written by DataEase 25/09/15 at 08:42:39
Product: Dataease [{8}]FIVE. Written by afonso santos 28/01/16 at 00:12:16
Product: Dataease [{8}]FIVE. Written by DataEase 28/01/16 at 07:01:51
Product: Dataease [{8}]FIVE. Written by afonso santos 13/06/16 at 22:44:45
Product: LegEasy 9 Developer. Written by DataEase 03/10/24 at 15:49:41
Product: Dataease [{8}]FIVE. Written by DataEase 07/11/12 at 12:52:17
Product: Dataease [{8}]FIVE. Written by DataEase 27/04/13 at 09:17:21
Product: Dataease [{8}]FIVE. Written by DataEase 18/06/13 at 22:08:56
Product: Dataease [{8}]FIVE. Written by DataEase 20/08/14 at 16:59:56
Product: Dataease [{8}]FIVE. Written by DataEase 05/06/15 at 10:35:09
Product: Dataease [{8}]FIVE. Written by DataEase 22/06/15 at 15:31:39
Product: . Written by DataEase 25/09/15 at 08:54:32
Product: Dataease [{8}]FIVE. Written by DataEase 01/12/15 at 15:06:26
Product: . Written by Ihor Zakharchenko 03/10/24 at 16:23:54