Hi there,
Suppose the following code:
------------------------------------
type
TPanelList = class(TPanel)
private
btnTitle: TBitBtn;
lstItem: TListBox;
published
property Title:TBitBtn read btnTitle write btnTitle;
property List: TListBox read lstItem write lstItem;
end;
------------------------------------
How to access properties and methods of one sub component directly and how the main component to respond to events of the sub component?
My component is already implemented in many forms but I want to add a new property 'Caption' (via a BitBtn control)to a descendant of a TListBox.
Actually, the references are like MyList.Items... and all events generated come from TListBox (MyList.OnItemSelect) But with the new TPanel as a parent, references will be like MyList.List.Items and events won't be raised...
Using Type TPanelList = class(TPanel, TListBox) will not work because ListBox has to be within a TPanel...
Any clues?
Thanks in advance.
Suppose the following code:
------------------------------------
type
TPanelList = class(TPanel)
private
btnTitle: TBitBtn;
lstItem: TListBox;
published
property Title:TBitBtn read btnTitle write btnTitle;
property List: TListBox read lstItem write lstItem;
end;
------------------------------------
How to access properties and methods of one sub component directly and how the main component to respond to events of the sub component?
My component is already implemented in many forms but I want to add a new property 'Caption' (via a BitBtn control)to a descendant of a TListBox.
Actually, the references are like MyList.Items... and all events generated come from TListBox (MyList.OnItemSelect) But with the new TPanel as a parent, references will be like MyList.List.Items and events won't be raised...
Using Type TPanelList = class(TPanel, TListBox) will not work because ListBox has to be within a TPanel...
Any clues?
Thanks in advance.