To change the text property on a Label, Button, Tab. This can be used for error message, further information, to store information in the page/form for future query, to change the label on a button or tab etc.
ObjectName: Text
The name of the object that you want to change the text property off. All objects names are case sensitve.
NewText: Text
The new text you want to set on the object. Be aware that SetLabelText do not resize the object so make sure there is enough space for the new text on the object.
SetLabelText() is a function that will allow you to change a label from anywhere in DataEase 8. You can use it from ExecDQL, in a field derivation or from a button.
Like all new Set functions it works on the Form context so you will use the object denomination "objectname".
SetLabelText("MyLabel","This is a sample")
SetLabelText("MyLabel",Field1)
SetLabelText("MyLabel",concat(GetGlobal("LabelVar"),";",MyField))
NB! All object names are case-sensitive!
You can use Labels as Messages and you can combine them with SetState() for hiding and showing, SetColor() to change the color and background color etc.
One of the obvious benefits over normal fields is that they are not fields. Fields are part of the data-schema and if you change a field it will affect the status of the form as being "changed", this does not happen when you use a label.
Another great benefit is that they are transparent, so you can put them on top of Images etc.
NB! Remember that the size of a label cannot be changed from this function so make sure that your label object is large enough to accommodate your message. A label will typically be the right size for it's original content so you will have to drag it out to the max size of the content you want to fit. Labels are automatically multiline.
Product: Dataease [{8}]FIVE. Written by DataEase 27/04/13 at 09:17:21
Product: Dataease [{8}]FIVE. Written by DataEase 06/05/13 at 10:38:26