How can reset screen?

Hi All…

I’m looking for a way to reset the Screen.
For example:
if I wrote in 20 text box…changed 5 labels, put 3 pictures
when click en SEND INFO

I do not want to do this:

Can i use other option for reset the screen to Zero or empty values?

Thx u in advanced !

The twenty text box can be regroupe in a single ‘all component’ list, as can the five labels in another list, and the two pictures in yet another one; but if this is the only time they all have to regrouped, the solution would be more complex than the problem; you would need 3 loops to process the clearing; but setting the lists (which cannot be done statically, it has to be done in an active component, like screen1.initialize) is going to be as big as the brute force and dumb “list them all” that you do not want to do.

If you were doing other “group activities” (like changing the font size, background colour) the ‘all component’ could make sense, because the other property could also be handled in a all component of the list loop.
But for a single instance, even for 20 +5 +2 components; that is not really the simplest approach.

At the moment I am using this solution:

When Click SEND INFO button (Screen1) : Go to Screen2
Screen2 i have this block, that return to Screen 1


so, Screen1 values return to empty …

I think what u want to do is,

You have some textboxes, images, labels, and you want to send all these values to another screen for some use.



I have some values in textbox,label,images but when i send this values to my DB.
I want these values return to zero (default) on the same screen1

Here are a few important points:

  • you cannot and should not close screen1.
  • likewise, you should never have to open screen1; you return to it by closing the OTHER screen you are in

Basically, screen1 is your base interface. You can open other screens, but always need something to return to when finished. Another very important thing to remember is that you should not open a screen without closing it when done. Each time you open a screen, you open ANOTHER instance of it. With its own variables values and setting. If you start with Screen1 and have it open Screen2, which opens Screen3, and then this one opens Screen2 again, you have TWO copies of Screen2 pending. Do that often enough, and your device runs out of memory.

Notice in your blocks that the “close screen” had to be put in a function, because nothing can be appended to that block? So in essence, your Screen2 Initialize calls the cerrar function, which closes the screen, and normally does not even return to perform the opening of Screen1 (which would be irrelevant anyway). What you see after Screen2 closes is not the Screen1 that got opened, but the already open Screen1 that was there when Screen2 was called.

1 Like

Thx u for comments ! :+1:

1 Like