当前位置: 首页>>代码示例>>C#>>正文


C# ButtonItem.SetParent方法代码示例

本文整理汇总了C#中DevComponents.DotNetBar.ButtonItem.SetParent方法的典型用法代码示例。如果您正苦于以下问题:C# ButtonItem.SetParent方法的具体用法?C# ButtonItem.SetParent怎么用?C# ButtonItem.SetParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DevComponents.DotNetBar.ButtonItem的用法示例。


在下文中一共展示了ButtonItem.SetParent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateButtons

        private void CreateButtons()
        {
            m_ScrollUp = new ButtonItem("sysgalleryscrollup");
            m_ScrollUp.Text = "<expand direction=\"top\"/>";
            m_ScrollUp.Style = this.Style;
            m_ScrollUp.ColorTable = eButtonColor.OrangeWithBackground;
            m_ScrollUp.SetParent(this);
            m_ScrollUp.Click += new EventHandler(ScrollUp_Click);
            m_ScrollUp.ClickAutoRepeat = true;
            m_ScrollUp.ClickRepeatInterval = 200;
            m_ScrollUp.CanCustomize = false;
            m_ScrollUp.AutoCollapseOnClick = false;

            m_ScrollDown = new ButtonItem("sysgalleryscrolldown");
            m_ScrollDown.Text = "<expand direction=\"bottom\"/>";
            m_ScrollDown.Style = this.Style;
            m_ScrollDown.ColorTable = eButtonColor.OrangeWithBackground;
            m_ScrollDown.SetParent(this);
            m_ScrollDown.Click += new EventHandler(ScrollDown_Click);
            m_ScrollDown.ClickAutoRepeat = true;
            m_ScrollDown.ClickRepeatInterval = 200;
            m_ScrollDown.CanCustomize = false;
            m_ScrollDown.AutoCollapseOnClick = false;

            m_PopupGallery = new ButtonItem("sysgallerypopup");
            m_PopupGallery.Text = "<expand direction=\"popup\"/>";
            m_PopupGallery.ButtonStyle = eButtonStyle.TextOnlyAlways;
            m_PopupGallery.Style = this.Style;
            m_PopupGallery.ColorTable = eButtonColor.OrangeWithBackground;
            m_PopupGallery.SetParent(this);
            m_PopupGallery.Click += new EventHandler(PopupGallery_Click);
            m_PopupGallery.CanCustomize = false;
            m_PopupGallery.PopupOpen += new DotNetBarManager.PopupOpenEventHandler(PopupGallery_PopupOpen);
            m_PopupGallery.PopupShowing += new EventHandler(PopupGallery_PopupShowing);
            m_PopupGallery.PopupClose += new EventHandler(PopupGallery_PopupClose);
            m_PopupGallery.PopupFinalized += new EventHandler(PopupGallery_PopupFinalized);
        }
开发者ID:,项目名称:,代码行数:37,代码来源:

示例2: CreateConfigureButton

        private void CreateConfigureButton(int y, int height)
		{
			if(!m_ConfigureItemVisible)
				return;

			if(m_ConfigureItem==null)
			{
				LocalizationManager lm=new LocalizationManager(this.GetOwner() as IOwnerLocalize);

				m_ConfigureItem=new ButtonItem();
				m_ConfigureItem.Image=new System.Drawing.Bitmap(typeof(DevComponents.DotNetBar.DotNetBarManager),"SystemImages.NavBarConfigure.png");
                m_ConfigureItem.ImageFixedSize = m_ConfigureItem.Image.Size;
				m_ConfigureItem.Style=m_Style;
				m_ConfigureItem.ShowSubItems=false;
				m_ConfigureItem.SetSystemItem(true);
                m_ConfigureItem.ContainerState = eContainerState.NavigationPane;
				// Add Sub-Items
				ButtonItem item;
				if(m_ConfigureShowHideVisible)
				{
					item=new ButtonItem("sysShowMoreButtons");
					item.Image=new System.Drawing.Bitmap(typeof(DevComponents.DotNetBar.DotNetBarManager),"SystemImages.NavBarShowMore.png");
					item.Text=lm.GetDefaultLocalizedString(LocalizationKeys.NavBarShowMoreButtons);
					item.SetSystemItem(true);
					item.Click+=new EventHandler(this.OnShowMoreButtonsClick);
					m_ConfigureItem.SubItems.Add(item);

					item=new ButtonItem("sysShowFewerButtons");
					item.Image=new System.Drawing.Bitmap(typeof(DevComponents.DotNetBar.DotNetBarManager),"SystemImages.NavBarShowLess.png");
					item.Text=lm.GetDefaultLocalizedString(LocalizationKeys.NavBarShowFewerButtons);
					item.SetSystemItem(true);
					item.Click+=new EventHandler(this.OnShowFewerButtonsClick);
					m_ConfigureItem.SubItems.Add(item);
				}

				if(m_ConfigureNavOptionsVisible)
				{
					item=new ButtonItem("sysNavPaneOptions");
					item.Text=lm.GetDefaultLocalizedString(LocalizationKeys.NavBarOptions);
					item.Click+=new EventHandler(this.OnNavPaneOptionsClick);
					item.SetSystemItem(true);
					m_ConfigureItem.SubItems.Add(item);
				}

				if(m_ConfigureAddRemoveVisible)
				{
					CustomizeItem customize=new CustomizeItem();
					customize.Name="sysNavPaneAddRemove";
					customize.CustomizeItemVisible=false;
					m_ConfigureItem.SubItems.Add(customize);
				}

				m_ConfigureItem.SetParent(this);
				m_ConfigureItem.Click+=new EventHandler(this.ConfigureItemClick);
				m_ConfigureItem.ExpandChange+=new EventHandler(this.ConfigureExpandedChanged);
				m_ConfigureItem.PopupShowing+=new EventHandler(this.ConfigurePopupShowing);
				m_ConfigureItem.PopupSide=ePopupSide.Right;

				lm.Dispose();

				BarBaseControl ctrl=this.ContainerControl as BarBaseControl;
				if(ctrl!=null && ctrl.Font!=null)
					m_ConfigureItem.PopupFont=new Font(ctrl.Font,FontStyle.Regular);
				else
                    m_ConfigureItem.PopupFont = SystemFonts.MenuFont;
			}
			m_ConfigureItem.PopupType=ePopupType.Menu;
			m_ConfigureItem.Displayed=true;
            m_ConfigureItem.HeightInternal = height;
			m_ConfigureItem.RecalcSize();
			m_ConfigureItem.LeftInternal=m_Rect.Right-m_ConfigureItem.WidthInternal;
			m_ConfigureItem.TopInternal=y;
			m_ConfigureItem.HeightInternal=height;
		}
开发者ID:,项目名称:,代码行数:74,代码来源:


注:本文中的DevComponents.DotNetBar.ButtonItem.SetParent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。