Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New control derived from TCheckListBox

Status
Not open for further replies.

rcloutie

Programmer
May 26, 2005
164
CA
Hi all,

I'm trying to write a VCL which includes all function'ies from TCheckListBox [type TNewCtrl = class(TCheckListBox)]
but with some differences.

One of them is to hide the default checkbox column and replace it with a property 'CheckBox'.

How can I write code (I guess within DrawItem) to hide the checkbox column (that is, for my new control looks like just as the TListBox component)

Thank you
 
Hi there.

What fdo you want to accomplish with your new checked listbox?

There are 2 major drawbacks with the original CheckListbox which can be of interest:

1. Repaint seems not work properly when disable/enable the control.
2. You cannot add more than 32768 items in TCheckListbox. (But I think you never use more than 32k of items.)



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always another way to solve it, but I prefer my way.
 
I would copy the whole TCheckListBox class from the Checklst unit, and from there hide the Checkbox.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always another way to solve it, but I prefer my way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top