Question

IonutzIonutz Member Posts: 10
edited 2006-08-30 in Dynamics AX
Hello,

Can you please tell me why, if I write this code "element.design().controlname("MyControl")." , I can not access the "ShowLabel" property of the control, and if I set the "AutoDeclaration" property of the control to "yes" and then I write "MyControl." I can access the the "ShowLabel" property of my control ?

Thank you.


Best regards. :)
Ionutz

Comments

  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    Please read forum rule #7.
    Forum Rules
  • chackoThomaschackoThomas Member Posts: 2
    Hello

    For your case We can not access the property/method of the control using a single statement.For that you first need to create a instance of that controls base class and then proceed to access its properties.
    Eg:-
    FormStringControl   Mycontrol;
    ;
    Mycontrol = element.design().controlName('controlname');
    Mycontrol.showLabel(False);
    

    Hope this will solve your problem.

    Regards,
    Chacko Thomas
Sign In or Register to comment.