Class: RGhost::Grid::Style::BorderLines

Inherits:
Object
  • Object
show all
Defined in:
lib/rghost/grid/style/border_lines.rb

Instance Method Summary collapse

Instance Method Details

#set_style(grid) ⇒ Object


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/rghost/grid/style/border_lines.rb', line 3

def set_style(grid)

  grid.before_row do |b|
    
    b.horizontal_line(:top,    :size => grid.width)
    b.horizontal_line(:bottom,    :size => grid.width)
  end

  grid.before_column :only => 0 do |b|
    b.vertical_line_row
  end
  
  grid.after_column do |c|
    c.vertical_line_row
  end
  
  
  grid.header.before_create do |c|
    c.line_width(0)
    c.use_tag :bold
    c.horizontal_line(:top, :size => grid.width)
    c.horizontal_line(:bottom,:size => grid.width)
  end
  
  grid.header.after_create {|a| a.use_tag :normal }


  grid.header.before_column :only => 0 do |h|
    h.vertical_line_row
  end
  
  grid.header.after_column do |h|
    h.vertical_line_row
  end
  
  
  
  
end