.hidden .Visible problems with BootStrap 4


#1

I’m having problems with the .hidden and .Visible properties in BootStrap 4.

  1. Immediately after Button1.hide(), Button1.hidden = False. (ie. the hide() and show() methods don’t seem to affect the .hidden property). Am I doing this right? Should I use Button1.hide() or Button1.hidden = True to hide buttons?

  2. When entering code .Visible is listed as an option, but the debugger tells me the .Visible property is undefined.

The documentation tells me .hidden is not available for all controls - can I get a list of which ones it is available for?


#2

The most reliable way to hide and show controls is to deal directly with the control’s styling:

Hide a control:

Button1.style.display = "none"

Show a control:

Button1.style.display = "block"

This works for all controls.