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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VCL dynamic controls creation

Status
Not open for further replies.

rcloutie

Programmer
May 26, 2005
164
CA
I'm build a new VCL based on TListBox. I've added a new property 'Caption' which creates a BitBtn on top of the ListBox. The problem is that the Caption (bitbtn) hides the first 2 items of the list.

Is there a way to change the inherited Top property but not the VCL component one?

Thanks
 
In the components Cconstructor, set
Listbox.Height := 24

A tip, look at the sourcecode for the delphi-created component called TLabeledEdit.
This is a small component buit by 2 different components, much like your new component...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always another way to solve it, but I prefer my way.
 
Hi Nordlund,

Can't find TLabeledEdit source code anywhere...
Any internet address from which I can download it?

Thanks a lot in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top