How to set the visible property of a control in the page?
At first I thought It should be the same with the method in the classic. But when I continue, I found it wasn’t. We can not use this method: Currpage.“Page Control”.Visible := True. You will got the error:" You have specified an unkown variable. Visible". At last, I check the help documents and with a long long router, I got it. I want to share it with my friends. That’s all. Please check the solution underneath.
- Define a globe variable “IsVisible” and set its “IncludeInDataSet” property be “yes”.
- Set the property visible of the control in the page be “IsVisible”
- create a function SetVisible (var visible : Boolean) to set the value of the variable “IsVisible”
4.Before calling ListPage.RunModal = Action::LookupOk, I call that function first. Such as:
ListPage.SetVisible(Visible);//Visible is a local variable in the call page.
If ListPage.Runmodal = Action::LookupOk THEN BEGIN …bla.bla.bla…
It is one of my journal…
Hoping this will be usefull.