add_class


Description:

[ Version ( since = "3.0" ) ]
public void add_class (string class_name)

Adds a style class to this, so posterior calls to @get or any of the gtk_render_*() functions will make use of this new class for styling.

In the CSS file format, a Entry defining a “search” class, would be matched by:

 <!-- language="CSS" -->
entry.search { ... }

While any widget defining a “search” class would be matched by:

 <!-- language="CSS" -->
.search { ... }

Parameters:

this

a StyleContext

class_name

class name to use in styling




2022 vala-language.org