Check if verital scroller exists

Namespace:  QAliber.Engine.Controls.UIA
Assembly:  QAliber.Engine (in QAliber.Engine.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public bool CanScrollVertical { get; }
Visual Basic (Declaration)
Public ReadOnly Property CanScrollVertical As Boolean
Visual C++
public:
virtual property bool CanScrollVertical {
	bool get () sealed;
}

Return Value

True if vertical scroller found, false if not

Examples

CopyC#
System.Diagnostics.Process.Start("notepad");
UIAWindow notepadWin = Desktop.UIA[@"Untitled - Notepad", @"Notepad", @"UIAWindow"] as UIAWindow;
UIDocument doc = notepadWin[@"", @"Edit", @"15"] as UIDocument;
doc.Write("{LeftAlt}of");

UIAWindow fontWin = notepadWin[@"Font", @"#32770", @"UIAWindow"] as UIAWindow;
UIAListBox fontsList = fontWin[@"Font:", @"ComboBox", @"1136"][@"Font:", @"ComboLBox", @"ListBox"] as UIAListBox;
if (fontsList.CanScrollVertical)
{
    MessageBox.Show("Before scroll: Vertical % : " + fontsList.VericalPercents);
    fontsList.Scroll(-1, 30);
    MessageBox.Show("After: Vertical % : " + fontsList.VericalPercents);
}
if (!fontsList.CanScrollHorizontal)
{
    MessageBox.Show("No horizental scroller, see the % is : " + fontsList.HorizontalPercents + " negative");
}

See Also