Widget.setVisible

void setVisible(bool visible)

Sets the visibility state of widget. Note that setting this to true doesn’t mean the widget is actually viewable, see [gtk.widget.Widget.getVisible].

This function simply calls [gtk.widget.Widget.show] or [gtk.widget.Widget.hide] but is nicer to use when the visibility of the widget depends on some condition.

Parameters

visiblewhether the widget should be shown or not