Announcement

Collapse
No announcement yet.

tStaticText hide and display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tStaticText hide and display

    Hello,

    I'm struggling with the WriteObject(tStaticText,X,X) command (Visi genie - Gen4 uLCD 70 display)
    I want to hide or display a staticText depending on Input state.
    I use WriteObject(tStaticText,23, -1); to hide the text and WriteObject(tStaticText,23,1); to display it.

    On startup, it works fine but once the text is displayed, It is no anymore hidden with the WriteObject(tStaticText,23, -1) .
    I found out that if I switch on another form and come back, then the text disappear ! (without any further code ...)
    It seems as if the WriteObject(tStaticText,23, -1) function is only took into account when updating the form ...

    Thanks a lot for your help !


  • #2
    Hello !

    Any chance to have some help on this subject ... I would need to send the screen to my customer ...
    Thanks a lot !

    Comment


    • #3
      Hi,

      For hiding the StaticText widget you can use the RectangleFilled after the WriteObject(tStaticText,23, -1); command. This RectangleFilled will cover the widget. Make sure that the background color of the form is the same as the color of the rectangle.

      You can add the snippet of the code below to implement this.


      Code:
      WriteObject(tStaticText, 0, -1);
      
      var sx0, sy0, sx1, sy1;
      sx0 := img_GetWord(hndl, iStatictext0, IMAGE_XPOS);
      sy0 := img_GetWord(hndl, iStatictext0, IMAGE_YPOS);
      sx1 := sx0 + img_GetWord(hndl, iStatictext0, IMAGE_WIDTH) - 1;
      sy1 := sy0 + img_GetWord(hndl, iStatictext0, IMAGE_HEIGHT) - 1;
      
      gfx_RectangleFilled(sx0, sy0, sx1, sy1, BLACK);

      I hope this helps.

      Best regards.

      Comment


      • #4
        Thanks !
        Lorenz'

        Comment


        • #5
          Hi,

          You're welcome.

          If you need anything to ask regarding the display, feel free to open a ticket here 4D Systems helpdesk or a new forum post.

          Best regards.

          Comment

          Working...
          X