Conditionaly hide textbox

lloydflloydf Member Posts: 73
Hi There
Does anyone know how to hide a textbox in cside based on a condition?

Thanks

LLoyd

Comments

  • ClausHamannClausHamann Member Posts: 80
    Hi LLoyd

    You can use:

    CurrForm.MyTextBoxName.VISIBLE := FALSE;

    Regards

    Claus
  • nachoporcarnachoporcar Member Posts: 27
    And.. how can i hide it in a Report???

    because this

    CurrReport.MyTextBoxName.VISIBLE := FALSE;

    Not run
  • ClausHamannClausHamann Member Posts: 80
    You will have to create two sections, one with the field you want to hide and one without the field. You can use CurrReport.SHOWOUTPUT on both sections to hide or show the section (show one section and hide the other one).

    Regards

    Claus
  • babbab Member Posts: 65
    I think you can do it without 2 sections:
    - Declare a global variable (Text2Hide Code20)
    - Place a TextBox where you want it, with SourceExpression Text2Hide
    - In the OnPreSection trigger you can write forexample
    IF CurrReport.PREVIEW THEN
      Text2Show := ''
    ELSE
      Text2Show := "Document No.";
    
Sign In or Register to comment.