如何在不改动tcombobox的源代码的情况下,加大TComboBox的下拉列表框的width呢?(200分)

  • 主题发起人 主题发起人 wangergulei
  • 开始时间 开始时间
W

wangergulei

Unregistered / Unconfirmed
GUEST, unregistred user!
恩,如题,不过是只改下拉列表框的width,而不是整个tcombobox的width。
事实上,想要实现的目的是,当前的combobox里的items里存放的item的长度(width)
长于combobox本身的长度,这样,当打开下拉列表框的时候,就看不见每个
item的全部的值,如果用hint的方法呢,又不直观,所以我想看看有什么法子
,可以在combobox打开的时候,把combobox的下拉列表框的width加长——
但是不加长combobox本身的长度——以看到每个item的完整的值。
 
发错了。重复发了。只好结帖了。
 
也不让结束,怎么删除呢?奇怪。
 
来个人来领分就可以揭帖了,呵呵
CB_SETDROPPEDWIDTH
有空看看系统源码,蛮长知识的呵呵
unit Messages
{ Combo Box messages }
{$EXTERNALSYM CB_GETEDITSEL}
CB_GETEDITSEL = $0140;
{$EXTERNALSYM CB_LIMITTEXT}
CB_LIMITTEXT = $0141;
{$EXTERNALSYM CB_SETEDITSEL}
CB_SETEDITSEL = $0142;
{$EXTERNALSYM CB_ADDSTRING}
CB_ADDSTRING = $0143;
{$EXTERNALSYM CB_DELETESTRING}
CB_DELETESTRING = $0144;
{$EXTERNALSYM CB_DIR}
CB_DIR = $0145;
{$EXTERNALSYM CB_GETCOUNT}
CB_GETCOUNT = $0146;
{$EXTERNALSYM CB_GETCURSEL}
CB_GETCURSEL = $0147;
{$EXTERNALSYM CB_GETLBTEXT}
CB_GETLBTEXT = $0148;
{$EXTERNALSYM CB_GETLBTEXTLEN}
CB_GETLBTEXTLEN = $0149;
{$EXTERNALSYM CB_INSERTSTRING}
CB_INSERTSTRING = $014A;
{$EXTERNALSYM CB_RESETCONTENT}
CB_RESETCONTENT = $014B;
{$EXTERNALSYM CB_FINDSTRING}
CB_FINDSTRING = $014C;
{$EXTERNALSYM CB_SELECTSTRING}
CB_SELECTSTRING = $014D;
{$EXTERNALSYM CB_SETCURSEL}
CB_SETCURSEL = $014E;
{$EXTERNALSYM CB_SHOWDROPDOWN}
CB_SHOWDROPDOWN = $014F;
{$EXTERNALSYM CB_GETITEMDATA}
CB_GETITEMDATA = $0150;
{$EXTERNALSYM CB_SETITEMDATA}
CB_SETITEMDATA = $0151;
{$EXTERNALSYM CB_GETDROPPEDCONTROLRECT}
CB_GETDROPPEDCONTROLRECT = $0152;
{$EXTERNALSYM CB_SETITEMHEIGHT}
CB_SETITEMHEIGHT = $0153;
{$EXTERNALSYM CB_GETITEMHEIGHT}
CB_GETITEMHEIGHT = $0154;
{$EXTERNALSYM CB_SETEXTENDEDUI}
CB_SETEXTENDEDUI = $0155;
{$EXTERNALSYM CB_GETEXTENDEDUI}
CB_GETEXTENDEDUI = $0156;
{$EXTERNALSYM CB_GETDROPPEDSTATE}
CB_GETDROPPEDSTATE = $0157;
{$EXTERNALSYM CB_FINDSTRINGEXACT}
CB_FINDSTRINGEXACT = $0158;
{$EXTERNALSYM CB_SETLOCALE}
CB_SETLOCALE = 345;
{$EXTERNALSYM CB_GETLOCALE}
CB_GETLOCALE = 346;
{$EXTERNALSYM CB_GETTOPINDEX}
CB_GETTOPINDEX = 347;
{$EXTERNALSYM CB_SETTOPINDEX}
CB_SETTOPINDEX = 348;
{$EXTERNALSYM CB_GETHORIZONTALEXTENT}
CB_GETHORIZONTALEXTENT = 349;
{$EXTERNALSYM CB_SETHORIZONTALEXTENT}
CB_SETHORIZONTALEXTENT = 350;
{$EXTERNALSYM CB_GETDROPPEDWIDTH}
CB_GETDROPPEDWIDTH = 351;
{$EXTERNALSYM CB_SETDROPPEDWIDTH}
CB_SETDROPPEDWIDTH = 352;
{$EXTERNALSYM CB_INITSTORAGE}
CB_INITSTORAGE = 353;
{$EXTERNALSYM CB_MSGMAX}
CB_MSGMAX = 354;
 
我来接分
 
我用business skin form里的combobox控件,有个属性可以控制下拉列表的宽度的
 
我来接分
 
后退
顶部