Easy to Create, Easy to Change - Easy to use!


Greyed out form fields


Started by
Search
You will need to Sign In to be able to add or comment on the forum!

Greyed out form fields

Written by 10/12/13 at 14:20:43 Dataease [{8}]FIVE

Re:Greyed out form fields

Download Sample

No username/password. Simply hit OK on login box.


We need to guess here, but I would think this is about disabling fields like in windows.

Pre DE8 the answer would be OML and showing/hiding of fields. Now it is much easier as you have SetState() that can both hide/show a field as well as disable/enable it.

A DataEase field will not change appearance because you enable/disable it. In windows that is "simple" because there is only very few default colours for these things. In DataEase you can use any colour for fill, border, font (as well as any font and size) so to have a default "disabled" would be crazy.

However when you do your SetState() one can simply do a SetColor() too.

in a virtual field called Manipulator you can set the following derivation.

If (CustomerNr not=blank, SetState("CustomerName",3)+SetColor("CustomerName","#0000ff","-1","-1")+SetFocus("CustomerName"),SetState("CustomerName",2)+SetColor("CustomerName","#707070","-1","-1"))

What this will do is to make the field Customername have blue font if CustomerNr is not blank (i.e. have a value) and give focus to CustomerName, but if customernr is blank it will disable it and make the font grey.

Written by DataEase 11/12/13 at 19:08:35 Dataease [{8}]FIVE