Class: RFormUnit::ListView
- Inherits:
-
BaseControl
- Object
- BaseControl
- RFormUnit::ListView
- Defined in:
- lib/rformunit/control.rb
Instance Attribute Summary
Attributes inherited from BaseControl
Instance Method Summary collapse
- #de_highlight(row_start, row_end = nil) ⇒ Object (also: #de_select)
-
#get_item_text(row, col = 0) ⇒ Object
row and column index starts from 0,.
-
#highlight(row_start, row_end = nil) ⇒ Object
can’t use select, as it is Ruby keyword.
- #is_selected?(row) ⇒ Boolean
- #item_count ⇒ Object
- #select_all ⇒ Object
- #subitem_count ⇒ Object
Methods inherited from BaseControl
#click, #focus, #get_text, #initialize, #is_enabled?, #is_visible?, #send_text, #set_text
Methods included from Driver
#close_window, #driver, #focus_window, #init, #key_press, #open_file_dialog, #set_autoit_option, #wait_and_focus_window, #wait_for_window, #window_exists?
Constructor Details
This class inherits a constructor from RFormUnit::BaseControl
Instance Method Details
#de_highlight(row_start, row_end = nil) ⇒ Object Also known as: de_select
130 131 132 133 |
# File 'lib/rformunit/control.rb', line 130 def de_highlight(row_start, row_end = nil) row_end ||= row_start driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "DeSelect" , "#{row_start}", "#{row_end}") end |
#get_item_text(row, col = 0) ⇒ Object
row and column index starts from 0,
120 121 122 |
# File 'lib/rformunit/control.rb', line 120 def get_item_text(row, col = 0) driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "GetText" , "#{row}", col) end |
#highlight(row_start, row_end = nil) ⇒ Object
can’t use select, as it is Ruby keyword
125 126 127 128 |
# File 'lib/rformunit/control.rb', line 125 def highlight(row_start, row_end = nil) row_end ||= row_start driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "Select" , "#{row_start}", "#{row_end}") end |
#is_selected?(row) ⇒ Boolean
145 146 147 |
# File 'lib/rformunit/control.rb', line 145 def is_selected?(row) 1 == driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "IsSelected" , "#{row}", "") end |
#item_count ⇒ Object
114 115 116 117 |
# File 'lib/rformunit/control.rb', line 114 def item_count result = driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "GetItemCount" , "", "").to_i result ? result.to_i : 0 end |
#select_all ⇒ Object
141 142 143 |
# File 'lib/rformunit/control.rb', line 141 def select_all driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "SelectAll" , "", "") end |
#subitem_count ⇒ Object
136 137 138 139 |
# File 'lib/rformunit/control.rb', line 136 def subitem_count result = driver.ControlListView(@parent_win.title, @parent_win.text, @control_id, "GetSubItemCount" , "", "").to_i result ? result.to_i : 0 end |