会员: 密码:  免费注册 | 忘记密码 | 会员登录 网页功能: 加入收藏 设为首页 网站搜索  
源代码 > Delphi代码 > 窗体界面
垂直的listbox控件
发表日期:2003-10-10 12:00:00文件大小:2292 下载次数:1880  

代码说明: 垂直的listbox控件 Virtual listbox components .VirtList implements 2 "virtual listbox" components, TCustomVirtualListBox and TVirtualListBox, which are extensions of the owner-drawn listbox. These use the Windows 95 LBS_NODATA style to specify a no-data listbox. A no-data listbox is very similar to an owner-drawn listbox, except that Windows does not manage the data for the list: the listbox contains no item data. Using the class is simple: you drop the component on the form, specify the properties, and implement an OnDrawItem (TDrawItemEvent) procedure. This procedure is passed the line number to be drawn. It's up to you to decide what to draw. Typically, the line number will index a data structure maintained by your application. A no-data listbox does not have an Items property, because, well... that's the whole idea, isn't it? There is no Sorted property, either, because the no-data listbox doesn't know how to move items around. The virtual listbox has one important new property: Count. The value of Count determines how many items are displayed. It replaces Items.Count, which isn't accessable because the Items property isn't public/published. There is also a ScrollBars property, which is missing from the standard TListBox component. (Why?) By John Cardinal (mailto:JCardinal@ElmSquare.com)

立即下载

返回顶部】 【打印本页】 【关闭窗口

关于我们 / 给我留言 / 版权举报 / 意见建议 / 网站编程QQ群   
Copyright ©2003- 2024 Lihuasoft.net webmaster(at)lihuasoft.net 加载时间 0.00242