G'Day,

I want to add some special functionality to some existing VCL controls. As an example I want to change the background colour of the control when it changes. (For my TEdit when the user types in the control, For TListBox when the item index changes etc.)

So I will be inheriting my classes from say TEdit and TListBox. Has anyone got any suggestions on how I could structure things so that the additional functionality (changing bg colour for eg) can be kept in once place and not have to be modified for each custom control.

Although both TEdit and TListBox have a common ancestor TWinControl I do not want to implement from there as I would have to implement TEdit control functionality. If I had a component that descended from TGraphicsControl then I would have an even bigger problem as I would have to go up to TComponent.

The only possible solution I can see at the moment is having this additional functionality in a seperate helper class. Anybody else got any other ideas?

TIA

-- Donovan
----------------------------------------------------------------------
Donovan J. Edye [
www.edye.wattle.id.au]
Namadgi Systems [
www.namsys.com.au]
Voice: +61 2 6285-3460
Fax: +61 2 6285-3459
TVisualBasic = Class(None);
Heard just before the 'Big Bang': "...Uh Oh...."
----------------------------------------------------------------------
GXExplorer [
http://www.gxexplorer.org] Freeware Windows Explorer
replacement. Also includes freeware delphi windows explorer components.
----------------------------------------------------------------------

Reply via email to