Board index » cppbuilder » Draw TButtonItem
Bill
![]() CBuilder Developer |
Draw TButtonItem2007-12-17 03:07:34 AM cppbuilder93 Hi, I've created a derived class of TButtonItem. class TMyButtomItem : public TButtonItem { public: __fastcall TMyButtomItem(Classes::TCollection* Collection); }; And added it to the CategoryButtons. pb = new TMyButtomItem(CategoryButtons1->Categories->Items[0]->Items); CategoryButtons1->Categories->Items[0]->Items->AddItem(pb, 0); However, when I tried to draw the button on CategoryButtons1DrawButton event, I can not cast the TButtonItem to TMyButtonItem, thus can not use the info came with TMyButtonItem. What can I do to Draw TMyButtonItem? Or How should I use TButtonItem. Any examples? Thanks -Bill |