TCheckListBox and TComboBox 的控件综合(100分)

飘雪

Unregistered / Unconfirmed
GUEST, unregistred user!
请问有谁见过或是开发过TCheckListBox and TComboBox 的综合控件

功能:
就是说在下拉框中出来的是包含有多个类似于CheckBox控件的控件
 
将ComboBox1的Style设置成'csOwnerDrawFixed',然后加入下面程序,看看是不是这样:
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
with TComboBox(Control) do
begin
if odFocused in State then
begin
Canvas.Brush.Color := clBlue;
Canvas.FillRect(Rect);
//你可以在这里画上选中的图像
Canvas.TextOut(Rect.Left, Rect.Top, '√' + Items[Index]);
end else
begin
Canvas.Brush.Color := clWhite;
Canvas.FillRect(Rect);
//你可以在这里画上没有选中的图像
Canvas.TextOut(Rect.Left, Rect.Top, '' + Items[Index]);
end;
end;
end;
 
我正打算自己做一个,等做好了给你一个:)
 
我已找到答案:
请各位到下面地址去下载相应的源码!!
http://www.torry.net/checklistandcomboboxes.htm
 
这个问题已经解决
怎么取消呀
 
我日,前面的人也是帮你用心考虑了的,你把分给他们就结束了嘛
 
楼主可能是不会结贴。。。
 
顶部