How to hide and show components?

I have a window with a number text boxes and text blocks.

I want to be able to show and hide them on the fly with the screen still visible. At present if I hide then during creating the window they don’t show.

If I try to make it invisible with the screen current, they do not clear.

Is it possible to do this without drawing a bitmap over them?

You have to draw over that area.

Maybe use

// In case the screen is re-rendered or the area is touched
myTextbox.Visible = false;

// This will only redraw the area the TextBox occupies with the background color or graphic.
Glide.Flush(myTextbox.Rect);

That almost works. I found I had to use the following prior to the Flush call.


    CurrentWindow.Graphics.DrawRectangle(myTextbox.Rect, CurrentWindow.BackColor, 255);

    Glide.Flush(myTextbox.Rect);