# Apply 2 styles

**URL:** <https://www.ruby-forum.com/t/apply-2-styles/193256>\
**Category:** Ruby-Gnome 2\
**Created:** [August 14, 2010, 7:29am UTC](https://www.ruby-forum.com/t/apply-2-styles/193256 "2010-08-14T07:29:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coubi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@coubi](https://www.ruby-forum.com/u/coubi)\
**Post date:** [August 14, 2010, 7:29am UTC](https://www.ruby-forum.com/t/apply-2-styles/193256/1 "2010-08-14T07:29:01Z")

</div>

Hi.

I would like to use two different styles in an application so I can  
propose a compact and a normal view.  
I am thinking of two differents way of doing it.

1. Writing a gtkrc-like file, parsing it and switching between the  
system style and the one I have written.
2. Use a method to redefine properties I want to change.

I try both methods without success.

1. 

my style file writes :  
style “zik-compact”  
{  
GtkTreeView ::vertical-separator = 0  
}

widget “ZiK.TreeView” style “zik-compact”

I try Gtk::RC.parse function but I do not see the modification.  
What am I missing ?  
Can switch back and forth between two styles ?

1. 

I cannot access to the vertical-separator property of a tree view via  
Gtk::TreeView#style\_get\_property(‘vertical-separator’)  
but I do not know how to set a new value for it. It is one of the  
properties I really need to change.

–  
Vincent C.

* * *

This [SF.net](http://SF.net) email is sponsored by

Make an app they can’t live without  
Enter the BlackBerry Developer Challenge

> **[Best Open Source Mac Front-Ends 2023](https://sourceforge.net/directory/front-ends/mac/)**
>
> Compare the best free open source Mac Front-Ends at SourceForge. Free, secure and fast Mac Front-Ends downloads from the largest Open Source applications and software directory
