Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
[UIAutoationWinforms] DataGrid: Edit->Text to match UIAClientAPI BNC …
Browse files Browse the repository at this point in the history
…#57645
  • Loading branch information
MarioCarrion committed Sep 13, 2010
1 parent 0eebba4 commit b5f48a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ public void Unselect ()
protected override object GetProviderPropertyValue (int propertyId)
{
if (propertyId == AutomationElementIdentifiers.ControlTypeProperty.Id)
return ControlType.Edit.Id;
return ControlType.Text.Id;
else if (propertyId == AutomationElementIdentifiers.HasKeyboardFocusProperty.Id)
// ItemProvider.DataGridProvider.DataGrid.Focused should be used here, but seems SWF.DataGrid loses this state randomly
return ItemProvider.DataGridProvider.DataGrid.CurrentCell.RowNumber == ItemProvider.Index
Expand Down
2 changes: 2 additions & 0 deletions UiaAtkBridge/UiaAtkBridge/SelectionProviderUserHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ private ISelectionItemProvider ChildItemAtIndex (int i)

IRawElementProviderSimple [] GetSelection () {
var elements = selectionProvider.GetSelection ();
if (elements == null)
return new IRawElementProviderSimple [0];
int controlTypeId = (int) provider.GetPropertyValue (AutomationElementIdentifiers.ControlTypeProperty.Id);
if (elements.Length == 0 || controlTypeId != ControlType.Group.Id)
return elements;
Expand Down
5 changes: 5 additions & 0 deletions UiaAtkBridge/UiaAtkBridge/TextBoxEntryView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public class TextBoxEntryView : ComponentParentAdapter, Atk.TextImplementor,
private ITextImplementor textExpert = null;
private bool multiLine = false;
private EditableTextImplementorHelper editableTextExpert;

protected TextBoxEntryView (IntPtr ptr)
: base (ptr)
{
}

public TextBoxEntryView (IRawElementProviderSimple provider) : base (provider)
{
Expand Down

0 comments on commit b5f48a7

Please sign in to comment.