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


C# Forms.PopupEventArgs类代码示例

本文整理汇总了C#中System.Windows.Forms.PopupEventArgs的典型用法代码示例。如果您正苦于以下问题:C# PopupEventArgs类的具体用法?C# PopupEventArgs怎么用?C# PopupEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PopupEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了PopupEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NotesTip_Popup

 private void NotesTip_Popup(object sender, PopupEventArgs e)
 {
     if (OwnerDraw)
     {
         // e.ToolTipSize = new Size(maxWidth + _padding.Horizontal, totalHeight);
     }
 }
开发者ID:powernick,项目名称:CodeLib,代码行数:7,代码来源:MyToolTip.cs

示例2: toolTip_Popup

 private static void toolTip_Popup(object sender, PopupEventArgs e)
 {
     Size sz = TextRenderer.MeasureText(((ToolTip)sender).GetToolTip(e.AssociatedControl), new Font(tooltipFontFace, tooltipFontSize));
     sz.Height += 4;
     sz.Width += 4;
     e.ToolTipSize = sz;
 }
开发者ID:tuanly,项目名称:SGM,代码行数:7,代码来源:SGMHelper.cs

示例3: OnUIAPopup

#pragma warning disable 169

		private static void OnUIAPopup (object sender, PopupEventArgs args)
		{
			ToolTip tooltip = (ToolTip) sender;			
			ToolTipProvider provider 
				= (ToolTipProvider) ProviderFactory.GetProvider (tooltip);			
			provider.Show (args.AssociatedControl);
		}
开发者ID:mono,项目名称:uia2atk,代码行数:9,代码来源:ToolTipListener.cs

示例4: toolTip1_Popup

		private void toolTip1_Popup(object sender, PopupEventArgs e)
		{
			toolTip1.SetToolTip(buttonDisplayLabelInfo, "Put into mailing label");
			toolTip1.SetToolTip(buttonClear, "Clear shipping information");
			toolTip1.SetToolTip(buttonPrint, "Print this program");
			toolTip1.SetToolTip(buttonExit, "Exit program");
		}
开发者ID:riveralexander,项目名称:C-.Net,代码行数:7,代码来源:Form1.cs

示例5: RichToolTip_Popup

 //Fires before the draw event. So set the tooltip size here.
 void RichToolTip_Popup(object sender, PopupEventArgs e)
 {
     using (Graphics g = RtbPCtrl.CreateGraphics())
     {
         toolTipSize = g.MeasureString(RtbPCtrl.Rtf.Trim(), RtbPCtrl.Font).ToSize();
         e.ToolTipSize = toolTipSize;
     }
 }
开发者ID:dakahler,项目名称:alloclave,代码行数:9,代码来源:RichToolTip.cs

示例6: OnPopup

 private void OnPopup(object sender, PopupEventArgs e)
 {
     var text = this.GetToolTip(e.AssociatedControl);
     var fontsize = e.AssociatedControl.FindForm().Font.Size;
     var font = new Font(SystemFonts.DefaultFont.FontFamily, fontsize);
     e.ToolTipSize = TextRenderer.MeasureText(text, font);
     e.ToolTipSize = new Size(e.ToolTipSize.Width + TOOLTIP_XOFFSET, e.ToolTipSize.Height + TOOLTIP_YOFFSET);
     font.Dispose();
 }
开发者ID:Camel-RD,项目名称:MyDownloder,代码行数:9,代码来源:MyToolTip.cs

示例7: MobToolTip_Popup

		private void MobToolTip_Popup( object sender, PopupEventArgs e ) {
			Size s;
			using( Font f = new Font( "Tahoma", 9 ) )
			using( Image img = new Bitmap( e.ToolTipSize.Width, e.ToolTipSize.Height ) )
			using( Graphics g = Graphics.FromImage( img ) )
				s = DrawMobInfo( g, f, false );

			e.ToolTipSize = new Size( s.Width + 4, s.Height + 4 );
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:9,代码来源:MobToolTip-old.cs

示例8: ColorToolTip_Popup

		public void ColorToolTip_Popup( object sender, PopupEventArgs e ) {
			SizeF s;
			// fake a Draw to get final Size
			using( Image img = new Bitmap( e.ToolTipSize.Width, e.ToolTipSize.Height ) ) {
				using( Graphics g = Graphics.FromImage( img ) ) {
					s = DrawTooltip( g, mDrawFont, false );
				}
			}

			e.ToolTipSize = new Size( (int)s.Width + 4, (int)s.Height + 4 );
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:11,代码来源:ColorToolTip.cs

示例9: ColorToolTip_Popup

		private void ColorToolTip_Popup(object sender, PopupEventArgs e) {
			// fake a Draw to get final Size

			SizeF finalSize;
			using (Image img = new Bitmap(e.ToolTipSize.Width, e.ToolTipSize.Height)) {
				using (Graphics g = Graphics.FromImage(img)) {
					finalSize = DrawTooltip(g, true);
				}
			}

			e.ToolTipSize = new Size((int)finalSize.Width + TooltipPadding.Right, (int)finalSize.Height + TooltipPadding.Bottom);
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:12,代码来源:ColorToolTip.cs

示例10: m_toolTip_Popup

        /// <summary>
        /// Handles popup event from ToolTip control.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void m_toolTip_Popup(object sender, PopupEventArgs e)
        {
            // If height of tooltip differs from the previous one, then we 
            // must store it and do not show tooltip at wrong position
            if (!m_size.Equals(e.ToolTipSize))
            {
                m_size = e.ToolTipSize;
                e.Cancel = true;
                m_canceled = true;
                m_text = String.Empty;
                return;
            }

            m_canceled = false;
        }
开发者ID:wow4all,项目名称:evemu_server,代码行数:20,代码来源:SkillQueueToolTip.cs

示例11: HtmlToolTip_Popup

        void HtmlToolTip_Popup(object sender, PopupEventArgs e)
        {
            string text = this.GetToolTip(e.AssociatedControl);
            string font = string.Format(NumberFormatInfo.InvariantInfo, "font: {0}pt {1}", e.AssociatedControl.Font.Size, e.AssociatedControl.Font.FontFamily.Name);

            //Create fragment container
            container = new InitialContainer("<table class=htmltooltipbackground cellspacing=5 cellpadding=0 style=\"" + font + "\"><tr><td style=border:0px>" + text + "</td></tr></table>");
            container.SetBounds(new Rectangle(0, 0, 10, 10));
            container.AvoidGeometryAntialias = true;

            //Measure bounds of the container
            using (Graphics g = e.AssociatedControl.CreateGraphics())
            {
                container.MeasureBounds(g);
            }

            //Set the size of the tooltip
            e.ToolTipSize = Size.Round(container.MaximumSize);
        }
开发者ID:krikelin,项目名称:LerosClient,代码行数:19,代码来源:HtmlToolTip.cs

示例12: filterTip_Popup

 /// <summary>
 /// Wywoływana, gdy pojawia się podpowiedź zawierająca tekst filtra. Dostosowywuje rozmiar podpowiedzi.
 /// </summary>
 /// <param name="sender">Podpowiedź wyświetlająca tekst filtra.</param>
 /// <param name="e">Argumenty zdarzenia.</param>
 void filterTip_Popup(object sender, PopupEventArgs e)
 {
     e.ToolTipSize = comboBox.Size;
 }
开发者ID:rafaliusz,项目名称:main,代码行数:9,代码来源:ComboBoxConfig.cs

示例13: variableHover_Popup

        private void variableHover_Popup(object sender, PopupEventArgs e)
        {
            using (Font fw = new Font(FontFamily.GenericMonospace, ToolTipFontSize))
            {
                SizeF size = TextRenderer.MeasureText(m_HoverText, fw);

                e.ToolTipSize = new Size((int)size.Width, (int)size.Height);
            }
        }
开发者ID:tomas-k,项目名称:renderdoc,代码行数:9,代码来源:ShaderViewer.cs

示例14: ToolTip_Popup

		private void ToolTip_Popup(object sender, PopupEventArgs e) {
			using (Graphics g = Graphics.FromHwnd(Handle)) {
				int width = (int) Math.Ceiling(g.MeasureString(_cell.Description, _font).Width) + 1;
				e.ToolTipSize = new Size(Math.Max(width, _cell.Width), RowHeight);
			}
		}
开发者ID:TargetProcess,项目名称:Tp.Integration.Ide.VisualStudio,代码行数:6,代码来源:TimeLogChartControl.cs

示例15: HandlePopup

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Handles the popup.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		void HandlePopup(object sender, PopupEventArgs e)
		{
			using (Graphics g = Graphics.FromHwnd(e.AssociatedWindow.Handle))
			{
				Size sz1 = TextRenderer.MeasureText(g, ToolTipTitle, m_fntTitle);
				Size sz2 = TextRenderer.MeasureText(g, m_text, m_fntText);

				m_rcTitle = new Rectangle(10, 10, sz1.Width, sz1.Height);
				m_rcText = new Rectangle(10, m_rcTitle.Bottom + 15, sz2.Width, sz2.Height);

				if (m_showMissingGlyphIcon)
				{
					m_rcTitle.X += (m_missingGlyphIcon.Width + 5);
					sz1.Width += (m_missingGlyphIcon.Width + 5);
					sz1.Height = Math.Max(sz1.Height, m_missingGlyphIcon.Height);
				}

				sz1.Width = Math.Max(sz1.Width, sz2.Width) + 20;
				sz1.Height += (sz2.Height + 35);
				e.ToolTipSize = sz1;
			}
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:27,代码来源:CharacterInfoToolTip.cs


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