Widget.setVisual

void setVisual(gdk.visual.Visual visual = null)

Sets the visual that should be used for by widget and its children for creating #GdkWindows. The visual must be on the same #GdkScreen as returned by [gtk.widget.Widget.getScreen], so handling the #GtkWidget::screen-changed signal is necessary.

Setting a new visual will not cause widget to recreate its windows, so you should call this function before widget is realized.

Parameters

visualvisual to be used or null to unset a previous one