简体   繁体   English

(C#,WinForms)如何为ImageList中的图像指定辅助功能属性

[英](C#, WinForms) How to assign an accessibility attribute to an image in ImageList

I'm trying to find a way to make a screen-reader (like JAWS) to read out loud some text that is assigned to images in ImageList. 我正试图找到一种方法来使屏幕阅读器(如JAWS)大声读出分配给ImageList中图像的一些文本。

In other controls (like PushButton) there is "AccessibleName" property, that when contains text, it's being read by JAWS. 在其他控件(如PushButton)中,有“AccessibleName”属性,当包含文本时,它正由JAWS读取。

the ImageList consists of four icons that represent priorities, and no text is displayed near them. ImageList由四个代表优先级的图标组成,并且不会在它们附近显示任何文本。

Is it possible to do it? 有可能吗? Can you think of any other creative solution? 你能想到其他任何创意解决方案吗?

Thanks, Yaniv. 谢谢,Yaniv。

An ImageList isn't really a visible control - it is a resource. ImageList实际上不是一个可见的控件 - 它是一种资源。 IIRC you would have to associate accessibility concerns with the control that is using the ImageList . IIRC您必须将可访问性问题与使用 ImageList的控件相关联。

Is there not an AccessibleName or AccessibleDescription property on the TreeNode object? TreeNode对象上是否没有AccessibleName或AccessibleDescription属性? Then, as you are building the dynamic node, and associating a specific image to it from the imagelist, you can also have some code that 'calculates' the accessible text for the image and sets one of those properties. 然后,在构建动态节点并将特定图像与图像列表关联时,您还可以使用一些代码“计算”图像的可访问文本并设置其中一个属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM