none
Access MS Accesability Properties (name, helptext) of ListBox item(child) in General

    Question

  • Is there a was to access the accessible Object of childs (items) of ListBoxes to change their MSAA propperties (name, helptext)?

    It is a WinForm Application.

     And is there a general good way (how to)  to implement MSAA in an WinForms application for Coded Ui Testing?

    Saturday, October 12, 2013 9:22 PM

All replies

  • Hi HeeTom,

    I’m afraid that it is not the correct forum about this issue, I will move this thread to Windows Desktop Development for Accessibility and Automation forum for more efficient responses.

    Thanks.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 14, 2013 5:22 AM
  • thanks for the movement to the correct area.

    I hope here is someone who can help me.
    Wednesday, October 16, 2013 1:30 AM
  • Take a look at the WinForms Accessibility for Developers topic. For more details you may need to talk to WinForms specialists in the WinForms forums.

    --Rob

    Wednesday, October 16, 2013 4:44 AM
  • I thought it is a accessibility problem …

     

    In general when I need to change and access the Acc Properties of an Object (and some little more) I usually create a derived class of the object and off the AccessibilityObject:

     

    public class AccImprovedButton : Button { protected void AccessibilityNotifyClients() { var accObj = AccessibilityObject as AccImprovedButtonAccessibleObject; if (accObj != null) { accObj.NotifyClients(AccessibleEvents.StateChange); } }

    protected override AccessibleObject CreateAccessibilityInstance() { return new AccImprovedButtonAccessibleObject (this); } } public class AccImprovedButtonAccessibleObject: Control.ControlAccessibleObject { /// <summary> /// The GUI element. /// </summary> private readonly AccImprovedButton _owner; public AccImprovedButtonAccessibleObject(AccImprovedButton owner) : base(owner) { _owner = owner; } public override string Name { get { return MyMagic() + base.Name; } set { base.Name = value; } } /// HelpText … }

     

    This way I can easily change what I need …

    But this only works for objects derived from System.Windows.Forms.Control

    There are some I want to change/access that are not derived from there:

    System.Windows.Forms.MenuItem

    System.Windows.Forms.ToolStripLabel

     

    They are derived from System.ComponentModel.Component … with no AccessibilityObject?

    How to do them?


    PS: Usually I'm a tester not a developer.

    • Edited by HeeTom Wednesday, October 23, 2013 9:46 AM
    Friday, October 18, 2013 11:54 AM