1. StatusBar Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | using System; using System.Windows.Forms; using System.Drawing; namespace WindowsFormsApp3 { class CsStatusBar { StatusBar statusbar; int currIndex; public CsStatusBar() { statusbar = new StatusBar(); statusbar.ShowPanels = true; currIndex = 0; } public StatusBar get() { return statusbar; } public void addPanel(String text) { statusbar.Panels.Add(text); statusbar.Panels[currIndex].AutoSize = StatusBarPanelAutoSize.Spring; //.Contents; statusbar.Panels[currIndex].BorderStyle = StatusBarPanelBorderStyle.Raised; currIndex++; } public void setText(int index, String text) { statusbar.Panels[index].Text = text; } public void setIcon(int index, Icon icon) { statusbar.Panels[index].Icon = icon; } } } |
댓글 없음:
댓글 쓰기