Control.setStyle method
protected void setStyle(ControlStyles flag, bool value)
Set or unset, based on if value
is true or false, respectively, the control's styles specified by flag
.
In the following example, the styles CACHE_TEXT and OPAQUE are set to true:
this.setStyle(ControlStyles.CACHE_TEXT | ControlStyles.OPAQUE, true);
See also: ControlStyles, getStyle