Element not visible when a method set to visible

Hi:

I have a form, Form1, with a method initForm() that is called in the onShow event. The method is:

elements.label1.visible = false

It’s ok, when Form1 is shown, the element is hidden.
I have another method setVisible():

elements.label1.visible = true

When I call this method, the element turns visible. Al right!

But… I have another form, Form2, with this method setVisibleInForm1():

forms.Form1.controller.show();
forms.Form1.setVisible();

When I call this method, the element label1 of Form1 remains hidden :cry:

Is it an issue? If it’s not, what can I do?

Thanks,

Servoy 2.2.7
JRE 1.5.0_10

Log-Out
Bogota - Colombia

What happens when you reverse the order?
Like so:

forms.Form1.setVisible();
forms.Form1.controller.show();

The same… label1 remains hidden…

Log-Out
Bogota - Colombia

Ah, I am re-reading your original question.
Your onShow method set the element to invisible.
This event is triggered after your method that shows the form is done.

Only option would be to remove the bit that hides the element out of the onShow method and set it yourself when needed.
Or set a variable true/false somewhere that this onShow method checks if to set the element to invisible.

Hope this helps.

Thanks… I had to set a variable as you suggest.

Log-Out
Madrid - Spain