icr
asked on
Setting OnClick methods in Borland C++ Builder
I am using Borland C++ Builder and am created an object (in this specific instance, a TLabel) in runtime:
class PreviewItem
{
private:
TPanel *Container;
TLabel *SelMask;
...more...
public:
PreviewItem(TPanel *Parent, String ImageSource, String CaptionText)
{
...create Container and other componants...
SelMask = new TLabel(Container);
SelMask->Parent = Container;
...set proterties for SelMask...
}
};
I want to set it's OnClick method to a function within the PreviewItem class. How would I do this?
class PreviewItem
{
private:
TPanel *Container;
TLabel *SelMask;
...more...
public:
PreviewItem(TPanel *Parent, String ImageSource, String CaptionText)
{
...create Container and other componants...
SelMask = new TLabel(Container);
SelMask->Parent = Container;
...set proterties for SelMask...
}
};
I want to set it's OnClick method to a function within the PreviewItem class. How would I do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER