Hi,
I wonder whether you may have any example of using forms in OAD? Like wForm = ZenForm(), wForm.Load("Some Form.czform"), etc?
I have tried loading an example form "Zeiss Form 2" but the loading procedure does not seem to work for me. I would like to use forms as an alternative to large user input Zenwindows and easier change between a short user input and possibility of extended user input.
Best regards
Fredrik Olsson
Using ZenForms in OAD
Hello Fredrik,
the following code is more kind of a snippet than a real example.
But I hope that it helps to get a first impression how to work with ZenForm.
the following code is more kind of a snippet than a real example.
But I hope that it helps to get a first impression how to work with ZenForm.
Code: Select all
form1 = Zen.Application.GetFirstForm()
form2 = Zen.Application.GetLastForm()
fName1 = form1.Name
fName2 = form2.Name
form = Zen.Application.GetForm(1)
fName = form.FileName
for i in range(0,form.ItemsCount):
item = form.GetItem(i)
id = item.Id
lab = item.LabelText
val = item.Value
ids = form.GetAllIds()
for i in range(0,ids.Length):
id = ids[i]
labs = form.GetAllLabelTexts()
for i in range(0,labs.Length):
lab = labs[i]