Link to home
Start Free TrialLog in
Avatar of icr
icrFlag for United Kingdom of Great Britain and Northern Ireland

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?
ASKER CERTIFIED SOLUTION
Avatar of acarrier
acarrier

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of icr

ASKER

Yay, works. Thanks. I did actually have all of that code, except when I was trying to assign the OnClick function I was trying to parse Sender. I suppose I should have mentioned that :) But thanks, great explination too ;)