Module: Bewildr::ControlPatterns::ExpandCollapsePattern
- Defined in:
- lib/bewildr/control_patterns/expand_collapse_pattern.rb
Instance Method Summary collapse
-
#collapse ⇒ Object
Collapses the element - use to close combo boxes.
-
#expand ⇒ Object
Expands the element - use to open combo boxes.
-
#expand_state ⇒ Object
Returns the expand-state of the element.
Instance Method Details
#collapse ⇒ Object
Collapses the element - use to close combo boxes
12 13 14 |
# File 'lib/bewildr/control_patterns/expand_collapse_pattern.rb', line 12 def collapse @automation_element.get_current_pattern(System::Windows::Automation::ExpandCollapsePattern.pattern).collapse unless == :collapsed or == :leaf end |
#expand ⇒ Object
Expands the element - use to open combo boxes
7 8 9 |
# File 'lib/bewildr/control_patterns/expand_collapse_pattern.rb', line 7 def @automation_element.get_current_pattern(System::Windows::Automation::ExpandCollapsePattern.pattern). unless == :expanded or == :leaf end |
#expand_state ⇒ Object
Returns the expand-state of the element. The available states are:
:collapsed
:expanded
:partially_expanded
:leaf
21 22 23 24 25 26 27 28 |
# File 'lib/bewildr/control_patterns/expand_collapse_pattern.rb', line 21 def case @automation_element.get_current_pattern(System::Windows::Automation::ExpandCollapsePattern.pattern).current. when System::Windows::Automation::ExpandCollapseState.collapsed then return :collapsed when System::Windows::Automation::ExpandCollapseState. then return :expanded when System::Windows::Automation::ExpandCollapseState. then return :partially_expanded when System::Windows::Automation::ExpandCollapseState.leaf_node then return :leaf end end |