Components don't hide when made invisible (Visible = false)

I have noticed that if I load a form from XML and change the visible state to false after the initial call to load, the component does not show when the form is drawn.

If I do the same setting to a component on a visible form and call the Invalidate() function, the component is not removed from the screen. In fact, if anything is actually set as not visible when loaded, it now appears even when you set its visible state to false.

Looks like I need to add code to Glide to actually draw the background of the form when the state is invisible? This of course will work simply by keep a note of the background colour but would fail if an image was used for the background unless I drew that part of the image where the control was.

I basically need to hide some components depending on states the software is running in.

1 Like