社区
C#
帖子详情
如何给ListBox控件中的项加上tooltips属性?
jlqidan
2003-08-20 02:00:18
看帮助文档说,listbox不支持此属性???????
...全文
55
4
打赏
收藏
如何给ListBox控件中的项加上tooltips属性?
看帮助文档说,listbox不支持此属性???????
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
cppTrier
2003-08-30
打赏
举报
回复
自己写一个类继承listbox加上tooltip属性。
jlqidan
2003-08-29
打赏
举报
回复
楼上的兄第,你那是windows form的写法吧,我要的是给web control控件加tooltip属性呀
大户翁
2003-08-28
打赏
举报
回复
加 toolTip1 控件
toolTip1.SetToolTip(listBox1,"说明");
jlqidan
2003-08-28
打赏
举报
回复
没人知道吗?是不是一定要自己写ascx控件呢?
Delphi开发技巧之-VCL
ListView 排序 Stringgrid内使用回车键代替Tab键 T
ListBox
内显示分栏 T
ListBox
每一行显示交互的颜色 TMemo内光标位置根据鼠标移动 TMemo自动卷动 TRichEdit卷到特定位置 TRxRichEdit内插入图像 TStringGrid
中
插入、删除一行 TStringGrid保存和装载 TTreeview
控件
显示粗体节点 TWebBrowser
中
调用“查找”对话框 为Listview栏添加双击事件 为工具栏的TToolButton设置新的索引 仅通过Classname创建和管理任意窗体 从RichEdit取Rtf格式 从T
ListBox
中
拖放
项
目到TRichEdit 从一个TRichedit复制格式Rtf文本到其它 使用CustomSort方法排序TListView 使用DBGrid字段队列同步列标题队列 使用Interfaces和TInterfaceList 使用TRichEdit存储大于64K数据 使用代码移动StringGrid的行和列 使用圆形角显示
控件
使用类名显示窗体 保存 装载TCheck
Listbox
值 保存和装载TListView 保存和装载TTreeView 允许TDBGrid栏调整大小但防止移动 克隆
控件
克隆窗体 列出
控件
的所有
属性
和事件 创建可编辑
ListBox
删除
Listbox
的所有选定
项
目 删除stringlist
中
重复
项
目 删除TStringGrid
中
的列 动画窗体 取ComboBox List句柄 取TListview内所有选定
项
目 取TShellListView
中
选定文件的路径 取列举值的名称 在combobox
中
实现autocomplete 在DBGrid
中
使用回车键改变到下一个段 在
listbox
内列出所有目录、文件和驱动器 在
Listbox
内显示水平滚动条 在memo
中
实现UNDO 在RichEdit内搜索文本并选择它 在StringGrid内使用Combobox作为编辑器 在StringGrid单元
中
画不同颜色 在TComboBox
中
显示栏 在TComboBox内绘制位图 在TDateTimePicker内显示星期几 在TFile
ListBox
内显示多列 在T
ListBox
中
创建彩色
项
目 在T
ListBox
内拖拽 在T
Listbox
内绘制位图 在TListview内执行二进制搜索 在TListView内拖拽多个
项
目 在TListView列
中
创建进度条 在TMemo内查看和编辑MS-DOS文本 在TPageControl拖拽Tabs 在TPrintDialog上放置定制
控件
在TRichEdit内使用上标和下标 在TRichEdit内使用超链接 在TRichEdit内文本使用不同的下划线样式 在TRichedit内设置段落行距 在TStringGrid内删除一行 在TStringGrid实现OnColumnClick事件 在自己的
控件
显示信息 复制
Listbox
项
目到剪贴板 失效TTreeview的
tooltip
s 定制TDateTimePicker的格式 居
中
控件
屏蔽在EditBox内按回车键的都都声 强制在TEdit内输入 排序StringGrid 搜索和替换RichEdit
中
文本 搜索和选定T
ListBox
的
项
目 改变TDBGrid的DefaultRowHeight 改变TRichEdit内选定文本的背景颜色 改变TStringGrid内选定单元的颜色 改变标准对话框 改变状态栏字体样式 改变窗体上所有
控件
的
属性
改变进度条颜色 根据StringGrid列内容自动调整大小 根据列排序TStringGrid 检查Stringgrid
中
指定单元示范选定 检查TMemo能否取消操作 检查TreeView是否完全展开或折叠 检查TStringGrid是否有滚动条 添加接口对象到list 清空StringGrid的所有单元 移动
listbox
项
目 移动TListView
项
目 移动TRichEdit内光标到指定位置 聚焦TDBGrid某些单元 自动打开TDateTimePicker 自定义Memo边界 获取TRichEdit
中
鼠标指针下面的字 访问TRadioGroup的
控件
调整TComboBox下拉列表的宽度 转换Editbox的首字符为大写 转换TEdit
中
每个词的首字母为大写 输出TStringGrid到TListView 运行时创建TButtons队列 运行时创建
控件
运行时创建菜单
项
运行时替换
控件
返回TTreeView内字符串路径 防止在TEdit内剪贴、复制、粘贴 防止用户调整TListView栏大小 限制TEdit的输入 隐藏TListView滚动条 隐藏最小化MDI子窗口 颜色Combo Box 验证TEdit
中
输入的是数字
Multiline balloon
tooltip
s on ListView items
Description: The attached code demonstrates a technique you can use to create multiline balloon
tooltip
s for ListView items.The code is based on the following simple idea. In the MouseMove event you need to check the index of the item under the mouse pointer, and if this item is changed, you simply redefine the text of the
tooltip
attached to the ListView control. Notice that you should destroy the
tooltip
if there is no any item under the mouse pointer.To determine the index of the list-view item under the mouse pointer, we send the LVM_HITTEST message to the ListView control. The SendMessage function you should use to send this message returns the index of the item at the specified position, if any, or -1 otherwise. Before you send the message, populate the pt field of an instance of the LVHITTESTINFO structure with the coordinates of the mouse pointer (you pass the reference to this structure as the value of the lParam parameter in SendMessage). You can use for this purpose the X and Y parameters of the MouseMove event of the control, but draw attention at the fact that these parameters can be measured in twips and you need to convert them in pixels.This simple idea can be used to create such
tooltip
s for
ListBox
items, any grid control items and so on. For instance, we use this technique in extra samples for iGrid ActiveX Control we produce (this is an editable replacement for ListView and FlexGrid
EhLib5.0.13 最新的ehlib源码
EhLib 5.0 Build 5.0.13 Russian version. Full source included. ------------------------------------------------------------------- The Library contains components and classes for Borland Delphi versions 5, 6, 7, 8 & 9 , Borland C++ Builder versions 5 & 6, Borland Developer Studio 2006, CodeGear Delphi 2007, CodeGear RAD Studio 2009 and Embarcadero RAD Studio 2010. TABLE OF CONTENTS ----------------- Overview Installation Library Installation Help Demonstration Programs Registering and Prices Other information About author Overview -------- The Library contains several components and objects. TDBGridEh component TDBGridEh provides all functionality of TDBGrid and adds several new features as follows: Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column resizing to set grid width equal client width. Ability to change row and title height. Allows automatic broken of a single line long title and data row to a multiline. Title can act as button and, optionally show a sort marker. Automatically sortmarking. Ability to truncate long text with ellipsis. Lookup list can show several fields. Incremental search in lookup fields. Frozen columns. DateTime picker support for TDateField and TDateTimeField. Allows to show bitmaps from TImageList depending on field value. Allows to hide and track horizontal or vertical scrollbars. Allows to hide columns. Allows to show 3D frame for frozen, footer and data rows. Allows to draw memo fields. Multiline inplace editor. Proportional scrolling independently of sequenced of dataset. Automatically show checkboxes for Boolean fields. Allows to show checkboxes for other type of fields. Has a procedures to save and restore layout (visible columns, columns order, columns width, sortmarkers, row height) in/from registry or
如何在
Listbox
上显示 In-place
Tooltip
s
大家知道 TreeView 上的节点如果显示不完全,鼠标移上去会出现一提示,这就是 In-place
Tooltip
s。下面这段代码在
Listbox
上实现这一功能(下面代码只是在标准
Listbox
上测试,如果是自画的,则要修改):{直接将下面代码拷贝到新建工程
中
Form1的Unit1.pas文件即可运行,不需添加任何
控件
}//--------------------------
webform
控件
和一些
属性
几乎所有的WebForm
控件
都具有的
属性
1.ClientID,获取
控件
在客户端的ID。 2.Visible
属性
,判断
控件
是否可见。如果
控件
的visible的
属性
设为False的话不仅调试的时候看不到该
控件
,在源文件一样看不到。 3.CssClass
属性
,
控件
的样式名,就是HTML
中
控件
的class
属性
。可以直接在
控件
的
属性
栏里修改CssClass的
属性
为你想要的css样式。当然那个样式
C#
110,534
社区成员
642,576
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章