Module: Bewildr::ControlPatterns::GridPattern

Defined in:
lib/bewildr/control_patterns/grid_pattern.rb

Instance Method Summary collapse

Instance Method Details

#column_countObject

Returns the number of columns in the grid



12
13
14
# File 'lib/bewildr/control_patterns/grid_pattern.rb', line 12

def column_count
  @automation_element.get_current_pattern(System::Windows::Automation::GridPattern.pattern).current.column_count.to_i
end

#get_item(row, column) ⇒ Object

Returns an item from the grid



17
18
19
20
# File 'lib/bewildr/control_patterns/grid_pattern.rb', line 17

def get_item(row, column)
  item = @automation_element.get_current_pattern(System::Windows::Automation::GridPattern.pattern).get_item(row, column)
  Bewildr::Element.new(item)
end

#row_countObject

Returns the number of rows in the grid



7
8
9
# File 'lib/bewildr/control_patterns/grid_pattern.rb', line 7

def row_count
  @automation_element.get_current_pattern(System::Windows::Automation::GridPattern.pattern).current.row_count.to_i
end