**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / WINELib / StatusBarPanel.cs
blobb5728b7744b6fcb413dae115fcf617203ed940b1
1 //
2 // System.Windows.Forms.StatusBarPanel
3 //
4 // Author:
5 // stubbed out by Richard Baumann (biochem333@nyc.rr.com)
6 // Dennis Hayes (dennish@Raytek.com)
7 //
8 // (C) Ximian, Inc., 2002
9 //
11 using System;
12 using System.ComponentModel;
13 using System.Drawing;
14 namespace System.Windows.Forms {
16 /// <summary>
17 /// Represents a panel in a StatusBar control.
18 /// </summary>
19 public class StatusBarPanel : Component, ISupportInitialize {
22 // --- Private Fields
24 private HorizontalAlignment alignment;
25 private StatusBarPanelAutoSize autoSize;
26 private StatusBarPanelBorderStyle borderStyle;
27 private Icon icon;
28 private int minWidth;
29 private StatusBar parent;
30 private StatusBarPanelStyle style;
31 private string text;
32 private string toolTipText;
33 private int width;
36 // --- Constructors/Destructors
38 StatusBarPanel() : base()
40 alignment = HorizontalAlignment.Left;
41 autoSize = StatusBarPanelAutoSize.None;
42 borderStyle = StatusBarPanelBorderStyle.Sunken;
43 icon = null;
44 minWidth = 10;
45 style = StatusBarPanelStyle.Text;
46 text = "";
47 toolTipText = "";
48 width = 100;
52 // --- Public Methods
54 [MonoTODO]
55 public void BeginInit()
57 throw new NotImplementedException ();
59 [MonoTODO]
60 public void EndInit()
62 throw new NotImplementedException ();
64 public override string ToString()
66 return text;
70 // --- Protected Methods
73 //inherited
74 //protected override void Dispose(bool disposing)
75 //{
76 // throw new NotImplementedException ();
77 //}
80 // --- Public Properties
82 public HorizontalAlignment Alignment {
84 get { return alignment; }
85 set { alignment = value; }
87 public StatusBarPanelAutoSize AutoSize {
89 get { return autoSize; }
90 set
92 if (value != StatusBarPanelAutoSize.None && value != StatusBarPanelAutoSize.Contents && value != StatusBarPanelAutoSize.Spring) {
94 throw new InvalidEnumArgumentException("System.Windows.Forms.StatusBarPanel::set_AutoSize(StatusBarPanelAutoSize) " +
95 "value is not a valid StatusBarPanelAutoSize value");
97 autoSize = value;
100 public StatusBarPanelBorderStyle BorderStyle {
102 get { return borderStyle; }
103 set { borderStyle = value; }
105 public Icon Icon {
107 get { return icon; }
108 set { icon = value; }
110 public int MinWidth {
112 get { return minWidth; }
113 set { minWidth = value; }
115 public StatusBar Parent {
117 get { return parent; }
118 set { parent = value; }
120 public StatusBarPanelStyle Style {
122 get { return style; }
123 set { style = value; }
125 public string Text {
127 get { return text; }
128 set { text = value; }
130 public string ToolTipText {
132 get { return toolTipText; }
133 set { toolTipText = value; }
135 public int Width {
137 get { return width; }
138 set { width = value; }