原創(chuàng)|其它|編輯:郝浩|2013-01-21 12:02:05.000|閱讀 1045 次
概述:本示例展示如何在DXperience WinForms12.2中創(chuàng)建SuperToolTip。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
在DXperience WinForms Subscription中,有時需要創(chuàng)建SuperToolTip(高級工具提示)。下面這個示例演示了如何用兩個工具條創(chuàng)建SuperToolTip對象。第一個工具項將顯示"Edit Popup Menu" 字符串,第二個工具項包含一張圖片并顯示"Show the Edit popup menu" 文本:
這個示例展示了為SuperToolTip對象添加工具條項的兩種方式:
向DXperience Winforms添加SuperToolTip示例:
using DevExpress.Utils; // The component used to load images from a form's resources. System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); // The image to display within a SuperTooltip. Image resImage = ((System.Drawing.Image)(resources.GetObject("resource.Image1"))); // Method 1 SuperToolTip sTooltip1 = new SuperToolTip(); // Create a tooltip item that represents a header. ToolTipTitleItem titleItem1 = new ToolTipTitleItem(); titleItem1.Text = "Edit Popup Menu"; // Create a tooltip item that represents the SuperTooltip's contents. ToolTipItem item1 = new ToolTipItem(); item1.Image = resImage; item1.Text = "Show the Edit popup menu"; // Add the tooltip items to the SuperTooltip. sTooltip1.Items.Add(titleItem1); sTooltip1.Items.Add(item1); // Assign the created SuperToolTip to a BarItem. barItem1.SuperTip = sTooltip1; // Method 2 SuperToolTip sTooltip2 = new SuperToolTip(); // Create an object to initialize the SuperToolTip. SuperToolTipSetupArgs args = new SuperToolTipSetupArgs(); args.Title.Text = "Edit Popup Menu"; args.Contents.Text = "Show the Edit popup menu"; args.Contents.Image = resImage; sTooltip2.Setup(args); // Assign the created SuperToolTip to a BarItem. barItem2.SuperTip = sTooltip2;
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件