protected void AddMenu(ChoiceGroup choice) { bool fAlignmentLeft = GetOptionalMenuAlignment(choice); var button = new PanelMenu(choice, m_smallImages, m_menuBarAdapter); button.AccessibilityObject.Name = choice.Id; button.Dock = fAlignmentLeft ? DockStyle.Left : DockStyle.Right; var spacer = new Spacer(); spacer.AccessibilityObject.Name = choice.Id; spacer.Dock = DockStyle.Left; spacer.Width = 10; if (fAlignmentLeft) { m_panelMain.Controls.Add(spacer); m_panelMain.Controls.Add(button); } else { spacer.Dock = DockStyle.Right; spacer.Width = 10; m_panelMain.Controls.Add(button); m_panelMain.Controls.Add(spacer); } }
protected void AddMenu(XCore.ChoiceGroup choice) { PanelMenu button = new PanelMenu(choice,m_smallImages, m_menuBarAdapter); Spacer s = new Spacer(); m_panelMain.Controls.Add(s); s.Dock = DockStyle.Left; s.Width = 10; m_panelMain.Controls.Add(button); button.Dock=DockStyle.Left; }
protected void AddMenu(XCore.ChoiceGroup choice) { PanelMenu button = new PanelMenu(choice, m_smallImages, m_menuBarAdapter); Spacer s = new Spacer(); m_panelMain.Controls.Add(s); s.Dock = DockStyle.Left; s.Width = 10; m_panelMain.Controls.Add(button); button.Dock = DockStyle.Left; }