Programmatically Make Textbox Non-Visible

toootooo Member Posts: 138
I'm wondering if you can make a textbox non-visible through code, i see there is a visible property but i'm unsure how to implement it in code!?

Comments

  • suvidhasuvidha Member Posts: 117
    Yeah it is possible.
    Go to Text Box Properties and give a name:xyz
    Then Code as:
    Currform.xyz.Visible:=True/False
    Simple:)
  • toootooo Member Posts: 138
    Does CurrForm exist in NAV 4.1 as it's staying that i have to declare it as a variable??
  • tompynationtompynation Member Posts: 398
    Sure it does, open a form in design mode and Press F5, you will see the CurrForm.

    I guess you are trying to do this inside a Report?

    If so then you cannot use this CurrForm.
    Then you just copy the existing section where you want to Textbox to disapper, remove the texbox from it
    Click the Header of the section, press F9
    And add following code: CurrReport.SHOWOUTPUT(gv_Visible);

    When the gv_Visible is TRUE it will print the section, else it will skip the section.

    Add same code to the existing section (the one with the textbox)
Sign In or Register to comment.