StatusBarPanel.Icon 属性


获取或设置要显示在状态栏面板中的图标。Gets or sets the icon to display within the status bar panel.

 property System::Drawing::Icon ^ Icon { System::Drawing::Icon ^ get(); void set(System::Drawing::Icon ^ value); };
public System.Drawing.Icon Icon { get; set; }
member this.Icon : System.Drawing.Icon with get, set
Public Property Icon As Icon


Icon 表示要显示在面板中的图标。An Icon that represents the icon to display in the panel.


您可以使用此属性来显示一个图标,该图标表示应用程序或应用程序中的进程的状态。You can use this property to display an icon that represents the state of your application or a process within your application. 例如,可以在 StatusBarPanel 中显示一个图标,以指示文件保存操作是正在进行还是已完成。For example, you can display an icon in a StatusBarPanel to indicate whether a file save operation is in progress or complete.


无法在 StatusBarPanel中单独定位图标。There is no way to independently position an icon within the StatusBarPanel. 例如,您不能将图标定位到 StatusBarPanel 的左侧,同时使用 Alignment 属性将右侧的文本对齐。For example, you cannot position an icon to the left side of the StatusBarPanel while aligning the text on the right side using the Alignment property. 不管文本的对齐方式如何,图标始终定位到面板文本的左侧。The icon is always positioned to the left side of the panel's text regardless of how the text is aligned.