當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。