本文整理汇总了C#中System.Windows.Forms.ToolBar类的典型用法代码示例。如果您正苦于以下问题:C# ToolBar类的具体用法?C# ToolBar怎么用?C# ToolBar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolBar类属于System.Windows.Forms命名空间,在下文中一共展示了ToolBar类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetExtendedToolBar
internal ToolBar GetExtendedToolBar(ToolBar toolbar)
{
// filtet the images that are applicable.
_automationToolbar = toolbar;
toolbar.ButtonSize = new Size(5, 5);
int buttonLength = toolbar.Buttons.Count;
for (int i = 0; i < buttonLength; ++i)
{
ToolBarButton button = toolbar.Buttons[i];
string toolText = button.ToolTipText;
if (Array.IndexOf(allowedEditButtons, toolText) < 0)
{
button.Visible = false;
// button.M
}
if (button.ToolTipText.Equals("Stamp", StringComparison.CurrentCultureIgnoreCase))
{
button.ToolTipText = "Signature";
}
}
return toolbar;
}
开发者ID:Amphora2015,项目名称:DemoTest,代码行数:28,代码来源:ImageToolBar.cs
示例2: MyWindow
public MyWindow()
: base()
{
Menu = new MainMenu();
Menu.MenuItems.Add("File");
Menu.MenuItems.Add("Edit");
Menu.MenuItems.Add("View");
Menu.MenuItems.Add("Help");
Bitmap bm = new Bitmap(GetType(), "SimpleToolbar.bmp");
ImageList imglist = new ImageList();
imglist.Images.AddStrip(bm);
imglist.TransparentColor = Color.LightBlue;
ToolBar tb = new ToolBar();
tb.Parent = this;
tb.ShowToolTips = true;
string[] astr = { "New", "Open", "Save", "Print", "Cut", "Copy", "Paste" };
for (int i = 0; i < 7; i++)
{
ToolBarButton tbb = new ToolBarButton();
tbb.ImageIndex = i;
tbb.ToolTipText = astr[i];
tb.Buttons.Add(tbb);
}
}
开发者ID:kmrashish,项目名称:DotNetLab,代码行数:25,代码来源:Program.cs
示例3: IDialog
public IDialog()
: base()
{
// Button
resultButton = new ResultButton();
this.Controls.Add(resultButton);
this.toolBar = new System.Windows.Forms.ToolBar();
this.tbOkButton = new System.Windows.Forms.ToolBarButton();
this.tbCancelButton = new System.Windows.Forms.ToolBarButton();
//
// toolBar
//
this.toolBar.Buttons.Add(this.tbOkButton);
this.toolBar.Buttons.Add(this.tbCancelButton);
this.toolBar.Name = "toolBar";
this.toolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
this.Controls.Add(this.toolBar);
// Toolbar
string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
ToolbarMaker.ToolBar = toolBar;
ToolbarMaker.AddIcon(appPath + @"\Icons\tbOk");
ToolbarMaker.AddIcon(appPath + @"\Icons\tbCancel");
this.TopMost = true;
}
开发者ID:ntj,项目名称:GravurGIS,代码行数:29,代码来源:IDialog.cs
示例4: InitializeMyToolBar
static public void InitializeMyToolBar(Form form)
{
// Create and initialize the ToolBar and ToolBarButton controls.
ToolBar toolBar1 = new ToolBar();
ToolBarButton toolBarButton1 = new ToolBarButton();
ToolBarButton toolBarButton2 = new ToolBarButton();
ToolBarButton toolBarButton3 = new ToolBarButton();
// Set the Text properties of the ToolBarButton controls.
toolBarButton1.Text = "Open";
toolBarButton2.Text = "Save";
toolBarButton3.Text = "Print";
// Add the ToolBarButton controls to the ToolBar.
toolBar1.Buttons.Add(toolBarButton1);
toolBar1.Buttons.Add(toolBarButton2);
toolBar1.Buttons.Add(toolBarButton3);
//Add the event-handler delegate.
toolBar1.ButtonClick += new ToolBarButtonClickEventHandler (
toolBar1_ButtonClick);
// Add the ToolBar to the Form.
form.Controls.Add(toolBar1);
}
开发者ID:mono,项目名称:uia2atk,代码行数:25,代码来源:FormTest.cs
示例5: Initialize
public override void Initialize() {
AutoScrollCanvas = true;
windowSD = ScrollControl.ScrollDirector;
documentSD = new DocumentScrollDirector();
ToolBar toolBar = new ToolBar();
ToolBarButton btnWindow = new ToolBarButton(WINDOW_LABEL);
ToolBarButton btnDocument = new ToolBarButton(DOCUMENT_LABEL);
toolBar.Buttons.Add(btnWindow);
toolBar.Buttons.Add(btnDocument);
toolBar.ButtonClick += new ToolBarButtonClickEventHandler(toolBar_ButtonClick);
this.Controls.Add(toolBar);
ScrollControl.Bounds = new Rectangle(ClientRectangle.X, toolBar.Bottom, ScrollControl.Width, ScrollControl.Height - toolBar.Height);
// Make some rectangles on the surface so we can see where we are
for (int x = 0; x < 20; x++) {
for (int y = 0; y < 20; y++) {
if (((x + y) % 2) == 0) {
PPath path = PPath.CreateRectangle(50 * x, 50 * y, 40, 40);
path.Brush = Brushes.Blue;
path.Pen = Pens.Black;
Canvas.Layer.AddChild(path);
}
else if (((x + y) % 2) == 1) {
PPath path = PPath.CreateEllipse(50 * x, 50 * y, 40, 40);
path.Brush = Brushes.Blue;
path.Pen = Pens.Black;
Canvas.Layer.AddChild(path);
}
}
}
}
开发者ID:malacandrian,项目名称:Piccolo.NET,代码行数:33,代码来源:ScrollingExample.cs
示例6: Form1
public Form1()
{
InitializeComponent();
list = new ImageList();
list.ImageSize = new Size(50, 50);
list.Images.Add(new Bitmap("open.bmp"));
list.Images.Add(new Bitmap("save.bmp"));
list.Images.Add(new Bitmap("exit.bmp"));
tBar = new ToolBar();
tBar.ImageList = list; //привяжем список картинок к тулбару
ToolBarButton toolBarButton1 = new ToolBarButton();
ToolBarButton toolBarButton2 = new ToolBarButton();
ToolBarButton toolBarButton3 = new ToolBarButton();
ToolBarButton separator = new ToolBarButton();
separator.Style = ToolBarButtonStyle.Separator;
toolBarButton1.ImageIndex = 0; //Open
toolBarButton2.ImageIndex = 1;// save
toolBarButton3.ImageIndex = 2; //exit
tBar.Buttons.Add(toolBarButton1);
tBar.Buttons.Add(separator);
tBar.Buttons.Add(toolBarButton2);
tBar.Buttons.Add(separator);
tBar.Buttons.Add(toolBarButton3);
tBar.Appearance = ToolBarAppearance.Flat;
tBar.BorderStyle = BorderStyle.Fixed3D;
tBar.ButtonClick += new ToolBarButtonClickEventHandler(tBar_ButtonClick);
this.Controls.Add(tBar);
}
开发者ID:xs2ranjeet,项目名称:13ns9-1spr,代码行数:35,代码来源:Form1.cs
示例7: Install
{ public static void Install (Panel ParentArg)
{ T_New New = new T_New (0) ;
T_Open Open = new T_Open (1) ;
T_Save Save = new T_Save (2) ;
T_SaveAll SaveAll = new T_SaveAll (3) ;
T_Close Close = new T_Close (4) ;
T_Cut Cut = new T_Cut (5) ;
T_Copy Copy = new T_Copy (6) ;
T_Paste Paste = new T_Paste (7) ;
T_Undo Undo = new T_Undo (8) ;
T_ColorHighlighter ColorHighlighter = new T_ColorHighlighter (9) ;
T_Search Search = new T_Search (10) ;
T_Print Print = new T_Print (11) ;
ToolBarButton Spacer = new ToolBarButton () ;
Spacer.Style = ToolBarButtonStyle.Separator ;
ImageList List = new ImageList () ;
List.Images.Add (New.GetBMP()) ;
List.Images.Add (Open.GetBMP()) ;
List.Images.Add (Save.GetBMP()) ;
List.Images.Add (SaveAll.GetBMP()) ;
List.Images.Add (Close.GetBMP()) ;
List.Images.Add (Cut.GetBMP()) ;
List.Images.Add (Copy.GetBMP()) ;
List.Images.Add (Paste.GetBMP()) ;
List.Images.Add (Undo.GetBMP()) ;
List.Images.Add (ColorHighlighter.GetBMP()) ;
List.Images.Add (Search.GetBMP()) ;
List.Images.Add (Print.GetBMP()) ;
ToolBar Bar = new ToolBar () ;
Bar.Parent = ParentArg ;
Bar.ImageList = List ;
Bar.ShowToolTips = true ;
Bar.ButtonClick += new ToolBarButtonClickEventHandler (BarClick) ;
Bar.Buttons.Add (New) ;
Bar.Buttons.Add (Open) ;
Bar.Buttons.Add (Save) ;
Bar.Buttons.Add (SaveAll) ;
Bar.Buttons.Add (Close) ;
Bar.Buttons.Add (Spacer) ;
Bar.Buttons.Add (Cut) ;
Bar.Buttons.Add (Copy) ;
Bar.Buttons.Add (Paste) ;
Bar.Buttons.Add (Spacer) ;
Bar.Buttons.Add (Undo) ;
Bar.Buttons.Add (ColorHighlighter) ;
Bar.Buttons.Add (Search) ;
Bar.Buttons.Add (Print) ;
}
开发者ID:kcb146,项目名称:editor,代码行数:58,代码来源:ToolBar_Manager.CS
示例8: MxToolBarSubclasser
public MxToolBarSubclasser(System.Windows.Forms.ToolBar toolBar)
{
if (toolBar == null)
{
throw new ArgumentNullException();
}
this._toolBar = toolBar;
this._painter = new MxToolBarPainter(this._toolBar);
}
开发者ID:ikvm,项目名称:webmatrix,代码行数:9,代码来源:MxToolBarSubclasser.cs
示例9: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof (ListToolBarControl));
this.toolBar = new System.Windows.Forms.ToolBar();
this.tbtnPasteList = new System.Windows.Forms.ToolBarButton();
this.tbtnSeparator = new System.Windows.Forms.ToolBarButton();
this.imageList = new System.Windows.Forms.ImageList(this.components);
this.tbtnAppendList = new System.Windows.Forms.ToolBarButton();
this.SuspendLayout();
//
// toolBar
//
this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[]{
this.tbtnPasteList,
this.tbtnAppendList,
this.tbtnSeparator
});
this.toolBar.DropDownArrows = true;
this.toolBar.ImageList = this.imageList;
this.toolBar.Location = new System.Drawing.Point(0, 0);
this.toolBar.Name = "toolBar";
this.toolBar.ShowToolTips = true;
this.toolBar.Size = new System.Drawing.Size(64, 30);
this.toolBar.TabIndex = 0;
this.toolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
//
// tbtnPasteList
//
this.tbtnPasteList.ImageIndex = 0;
this.tbtnPasteList.Tag = "PasteList";
this.tbtnPasteList.ToolTipText = "Paste list";
//
// tbtnSeparator
//
this.tbtnSeparator.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// imageList
//
this.imageList.ImageSize = new System.Drawing.Size(19, 18);
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
this.imageList.TransparentColor = System.Drawing.Color.Transparent;
//
// tbtnAppendList
//
this.tbtnAppendList.ImageIndex = 1;
this.tbtnAppendList.Tag = "AppendList";
this.tbtnAppendList.ToolTipText = "Append list";
//
// ListToolBarControl
//
this.Controls.Add(this.toolBar);
this.Name = "ListToolBarControl";
this.Size = new System.Drawing.Size(64, 32);
this.ResumeLayout(false);
}
开发者ID:satr,项目名称:regexexplorer,代码行数:60,代码来源:ListToolBarControl.cs
示例10: InitializeComponent
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.ToolBar = new System.Windows.Forms.ToolBar();
this.ImgList = new System.Windows.Forms.ImageList(this.components);
this.pnlToolbarPadding = new System.Windows.Forms.Panel();
this.CurrentToolTip = new System.Windows.Forms.ToolTip(this.components);
this.pnlToolbarPadding.SuspendLayout();
this.SuspendLayout();
//
//ToolBar
//
this.ToolBar.Anchor = (System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right));
this.ToolBar.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
this.ToolBar.AutoSize = false;
this.ToolBar.ButtonSize = new System.Drawing.Size(16, 16);
this.ToolBar.Divider = false;
this.ToolBar.Dock = System.Windows.Forms.DockStyle.None;
this.ToolBar.DropDownArrows = true;
this.ToolBar.ImageList = this.ImgList;
this.ToolBar.Location = new System.Drawing.Point(8, 1);
this.ToolBar.Name = "ToolBar";
this.ToolBar.ShowToolTips = true;
this.ToolBar.Size = new System.Drawing.Size(580, 26);
this.ToolBar.TabIndex = 0;
//
//ImgList
//
this.ImgList.ColorDepth = System.Windows.Forms.ColorDepth.Depth16Bit;
this.ImgList.ImageSize = new System.Drawing.Size(16, 16);
this.ImgList.TransparentColor = System.Drawing.Color.Transparent;
//
//pnlToolbarPadding
//
this.pnlToolbarPadding.Controls.Add(this.ToolBar);
this.pnlToolbarPadding.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlToolbarPadding.DockPadding.Left = 8;
this.pnlToolbarPadding.DockPadding.Right = 8;
this.pnlToolbarPadding.Location = new System.Drawing.Point(0, 0);
this.pnlToolbarPadding.Name = "pnlToolbarPadding";
this.pnlToolbarPadding.Size = new System.Drawing.Size(600, 28);
this.pnlToolbarPadding.TabIndex = 1;
//
//CurrentToolTip
//
this.CurrentToolTip.ShowAlways = true;
//
//GISAControl
//
this.Controls.Add(this.pnlToolbarPadding);
this.Name = "GISAControl";
this.Size = new System.Drawing.Size(600, 280);
this.pnlToolbarPadding.ResumeLayout(false);
this.ResumeLayout(false);
}
开发者ID:aureliopires,项目名称:gisa,代码行数:56,代码来源:GISAControl.cs
示例11: ToolbarLayout
public ToolbarLayout ()
{
toolbar = new ToolBar();
toolbar.Appearance = ToolBarAppearance.Flat;
//toolbar.ButtonSize = new Size(8, 8);
toolbar.Buttons.Add("Image");
toolbar.Buttons.Add("NoImage");
toolbar.Buttons.Add("Blahblahblah");
toolbar.Dock = DockStyle.Top;
Controls.Add (toolbar);
Panel fmt_frame = new Panel ();
fmt_frame.Dock = DockStyle.Fill;
Controls.Add (fmt_frame);
chkbox_appearance = new CheckBox ();
chkbox_appearance.Text = "Flat";
chkbox_appearance.Checked = true;
chkbox_appearance.CheckedChanged += new EventHandler (AppearanceChanged);
chkbox_appearance.Location = new Point (10, 10);
chkbox_appearance.Size = new Size (100, 20);
fmt_frame.Controls.Add (chkbox_appearance);
chkbox_btnsize = new CheckBox ();
chkbox_btnsize.Text = "Button Size";
chkbox_btnsize.Checked = false;
chkbox_btnsize.CheckedChanged += new EventHandler (ButtonSizeChanged);
chkbox_btnsize.Location = new Point (10, 40);
chkbox_btnsize.Size = new Size (100, 20);
fmt_frame.Controls.Add (chkbox_btnsize);
txt_width = new TextBox ();
txt_width.Location = new Point (110, 40);
txt_width.Size = new Size (50, 20);
fmt_frame.Controls.Add (txt_width);
txt_height = new TextBox ();
txt_height.Location = new Point (170, 40);
txt_height.Size = new Size (50, 20);
fmt_frame.Controls.Add (txt_height);
chkbox_images = new CheckBox ();
chkbox_images.Text = "Show Images";
chkbox_images.Checked = false;
chkbox_images.CheckedChanged += new EventHandler (ImagesChanged);
chkbox_images.Location = new Point (10, 70);
chkbox_images.Size = new Size (100, 20);
fmt_frame.Controls.Add (chkbox_images);
chkbox_align = new CheckBox ();
chkbox_align.Text = "Text Underneath";
chkbox_align.Checked = true;
chkbox_align.CheckedChanged += new EventHandler (AlignmentChanged);
chkbox_align.Location = new Point (10, 100);
chkbox_align.Size = new Size (150, 20);
fmt_frame.Controls.Add (chkbox_align);
images.ColorDepth = ColorDepth.Depth32Bit;
images.Images.Add (new Bitmap ("image1.bmp"));
images.ImageSize = new Size (40, 40);
}
开发者ID:hitswa,项目名称:winforms,代码行数:53,代码来源:layout-toolbar.cs
示例12: CanExtendTest
public void CanExtendTest ()
{
Control myControl = new Control ();
Form myForm = new Form ();
myForm.ShowInTaskbar = false;
ToolBar myToolBar = new ToolBar ();
ErrorProvider myErrorProvider = new ErrorProvider ();
Assert.AreEqual (myErrorProvider.CanExtend (myControl), true, "#ext1");
Assert.AreEqual (myErrorProvider.CanExtend (myToolBar), false, "#ext2");
Assert.AreEqual (myErrorProvider.CanExtend (myForm), false, "#ext3");
myForm.Dispose ();
}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:12,代码来源:ErrorProviderTest.cs
示例13: PtxToolBar
public PtxToolBar()
{
m_ToolBar = new ToolBar();
m_ToolBar.ButtonClick += new ToolBarButtonClickEventHandler(
this.OnToolBarClick);
m_ButtonList = new FRList<PtxToolButton>();
m_ToolBar.TextAlign = ToolBarTextAlign.Right;
m_ToolBar.AutoSize = false;
m_ToolBar.Height = 25;
m_ToolBar.ButtonSize = new System.Drawing.Size(30, 20);
}
开发者ID:JeffreyZksun,项目名称:opendraw,代码行数:13,代码来源:PtxToolBar.cs
示例14: SaveToolBarToFile
public static void SaveToolBarToFile(ToolBar pButtons, string pFile)
{
if (string.IsNullOrEmpty(pFile))
{
return;
}
if (pButtons == null)
{
return;
}
FileFunctions.SaveTextFile(pFile, pButtons.GetXml(), false);
}
开发者ID:spzenk,项目名称:sfdocsamples,代码行数:14,代码来源:Helper.cs
示例15: InitializeComponent
private void InitializeComponent() {
this.components = new Container();
ResourceManager resources = new ResourceManager(typeof (ScalerToolBarControl));
this.toolBar = new ToolBar();
this.tbtnScaleUp = new ToolBarButton();
this.tbtnScaleDown = new ToolBarButton();
this.imageList = new ImageList(this.components);
this.SuspendLayout();
//
// toolBar
//
this.toolBar.Buttons.AddRange(new ToolBarButton[] {
this.tbtnScaleUp,
this.tbtnScaleDown
});
this.toolBar.DropDownArrows = true;
this.toolBar.ImageList = this.imageList;
this.toolBar.Location = new Point(0, 0);
this.toolBar.Name = "toolBar";
this.toolBar.ShowToolTips = true;
this.toolBar.Size = new Size(56, 30);
this.toolBar.TabIndex = 0;
this.toolBar.ButtonClick += new ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
//
// tbtnScaleUp
//
this.tbtnScaleUp.ImageIndex = 0;
this.tbtnScaleUp.Tag = "ScaleUp";
this.tbtnScaleUp.ToolTipText = "Scale up";
//
// tbtnScaleDown
//
this.tbtnScaleDown.ImageIndex = 1;
this.tbtnScaleDown.Tag = "ScaleDown";
this.tbtnScaleDown.ToolTipText = "Scale down";
//
// imageList
//
this.imageList.ImageSize = new Size(19, 18);
this.imageList.ImageStream = ((ImageListStreamer) (resources.GetObject("imageList.ImageStream")));
this.imageList.TransparentColor = Color.Transparent;
//
// ScalerToolBarControl
//
this.Controls.Add(this.toolBar);
this.Name = "ScalerToolBarControl";
this.Size = new Size(56, 32);
this.ResumeLayout(false);
}
开发者ID:satr,项目名称:regexexplorer,代码行数:49,代码来源:ScalerToolBarControl.cs
示例16: SetUp
public override void SetUp ()
{
base.SetUp ();
menuButton = null;
toolBar = new ToolBar ();
toolBarButton = new ToolBarButton ("Button");
toolBar.Buttons.Add (toolBarButton);
//we rather create 2, to expose a bug in the provider
toolBar.Buttons.Add (new ToolBarButton ("another one"));
Form.Controls.Add (toolBar);
Form.Show ();
}
开发者ID:mono,项目名称:uia2atk,代码行数:15,代码来源:ToolBarButtonProviderTest.cs
示例17: MainController
public MainController(Form1 mainForm)
{
this._mainForm = mainForm;
this._controlBbar = mainForm.ControlBar;
this._browser = mainForm.Browser;
_browser.Navigating += new WebBrowserNavigatingEventHandler(_browser_Navigating);
_controlBbar.ButtonClick += new ToolBarButtonClickEventHandler(controlBbar_ButtonClick);
StringBuilder sb = new StringBuilder();
sb.Append("<html><body>Test</body></html>");
_browser.DocumentText = " ";
_browser.DocumentText = " ";
_browser.DocumentText = sb.ToString();
moduleController = new ModuleController(_browser);
}
开发者ID:ssoller,项目名称:Krypsis,代码行数:16,代码来源:MainController.cs
示例18: InitializeComponent
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.toolBar = new System.Windows.Forms.ToolBar();
this.button = new System.Windows.Forms.ToolBarButton();
this.menu = new System.Windows.Forms.ContextMenu();
this.SuspendLayout();
//
// toolBar
//
this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.button});
this.toolBar.ButtonSize = new System.Drawing.Size(62, 23);
this.toolBar.Divider = false;
this.toolBar.Dock = System.Windows.Forms.DockStyle.None;
this.toolBar.DropDownArrows = true;
this.toolBar.Location = new System.Drawing.Point(0, -2);
this.toolBar.Name = "toolBar";
this.toolBar.ShowToolTips = true;
this.toolBar.Size = new System.Drawing.Size(120, 34);
this.toolBar.TabIndex = 0;
this.toolBar.TextAlign = System.Windows.Forms.ToolBarTextAlign.Right;
this.toolBar.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar_ButtonClick);
//
// button
//
this.button.DropDownMenu = this.menu;
this.button.Name = "button";
this.button.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
//
// menu
//
this.menu.Popup += new System.EventHandler(this.menu_Popup);
//
// DropDownButton
//
this.Controls.Add(this.toolBar);
this.Name = "DropDownButton";
this.Size = new System.Drawing.Size(76, 23);
this.Load += new System.EventHandler(this.DropDownButton_Load);
this.Resize += new System.EventHandler(this.DropDownButton_Resize);
this.ResumeLayout(false);
this.PerformLayout();
}
开发者ID:Hza100,项目名称:subindex-mod,代码行数:48,代码来源:DropDownButton.cs
示例19: BasicPropertiesTest
public void BasicPropertiesTest ()
{
ToolBar toolBar = new ToolBar ();
IRawElementProviderSimple provider =
ProviderFactory.GetProvider (toolBar);
TestProperty (provider,
AutomationElementIdentifiers.ControlTypeProperty,
ControlType.ToolBar.Id);
TestProperty (provider,
AutomationElementIdentifiers.LocalizedControlTypeProperty,
"tool bar");
string value = "ToolBar Name Property";
toolBar.Text = value;
TestProperty (provider,
AutomationElementIdentifiers.NameProperty,
value);
}
开发者ID:mono,项目名称:uia2atk,代码行数:20,代码来源:ToolBarProviderTest.cs
示例20: SetButtonMenuItem
///<summary>
/// Set each ToolBarButton to a specific MenuItem
///</summary>
public void SetButtonMenuItem( Component pComponent, MenuCommand pMenuItem )
{
if( ! m_Dictionary.Contains( pComponent ))
{
m_Dictionary.Add( pComponent, pMenuItem );
if( m_ToolBar == null )
{
ToolBarButton pToolBarButton = pComponent as ToolBarButton;
if( pToolBarButton != null )
{
m_ToolBar = pToolBarButton.Parent as ToolBar;
if( m_ToolBar != null )
m_ToolBar.ButtonClick += new ToolBarButtonClickEventHandler( Handle_ToolbarButtonClick );
}
}
}
else
{
m_Dictionary[ pComponent ] = pMenuItem;
}
}
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:27,代码来源:ButtonManager.cs
注:本文中的System.Windows.Forms.ToolBar类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论