私は WinForms アプリを持っていますが、ToolStripStatusLabel
UIAutomation を介して a のテキストにアクセスできないようです。Microsoftは、 s (およびおそらくその中の項目)のサポートが制限されていることを暗示StatusStrip
していますが、これは機能する必要がある基本的な使用例のようです。
コントロールはControlType.Edit
UISpy で表示され、読み取り専用のテキスト ボックスのように見えますが、値はテキストではなく常に名前と同じです。
UISpy のプロパティは次のとおりです。
AutomationElement
General Accessibility
AccessKey: ""
AcceleratorKey: ""
IsKeyboardFocusable: "False"
LabeledBy: "(null)"
HelpText: ""
State
IsEnabled: "True"
HasKeyboardFocus: "False"
Identification
ClassName: ""
ControlType: "ControlType.Edit"
Culture: "(null)"
AutomationId: "StatusBar.Pane0"
LocalizedControlType: "edit"
Name: "My Label"
ProcessId: "3972 (*****)"
RuntimeId: "42 134002 0"
IsPassword: "False"
IsControlElement: "True"
IsContentElement: "True"
Visibility
BoundingRectangle: "(9, 273, 79, 17)"
ClickablePoint: "48,281"
IsOffscreen: "False"
ControlPatterns
GridItem
Row: "0"
Column: "0"
RowSpan: "1"
ColumnSpan: "1"
ContainingGrid: ""status bar" "statusStrip""
Value
Value: "My Label"
IsReadOnly: "True"
myLabel.Text = "something"
基本的に、 UIAutomation を介して何らかの方法でその値を取得できることを望んでいます。