Lena Posted September 10, 2015 Share Posted September 10, 2015 How change UniPanel->Title when OnCollapse event fire? This code dosn't work correct. Thanks. void __fastcall TMainForm::UniPanel7Collapse(TObject *Sender) { if(UniPanel7->CollapseDirection == cdBottom) { UniPanel7->Title = L"One"; } if(UniPanel7->CollapseDirection == cdTop) { UniPanel7->Title = L"Two"; } } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 10, 2015 Share Posted September 10, 2015 Hi, If I understand you correctly, try: procedure TMainForm.UniPanel1Collapse(Sender: TObject); begin (Sender as TUniPanel).Title := 'Collapsed' end; procedure TMainForm.UniPanel1Expand(Sender: TObject); begin (Sender as TUniPanel).Title := 'Expanded' end; Best regards. Quote Link to comment Share on other sites More sharing options...
Lena Posted September 10, 2015 Author Share Posted September 10, 2015 Thank you very much! void __fastcall TMainForm::UniPanel7Collapse(TObject *Sender) { TUniPanel * pan = dynamic_cast<TUniPanel*>(Sender); if(pan) { pan->Title = L"One"; } } //--------------------------------------------------------------------------- void __fastcall TMainForm::UniPanel7Expand(TObject *Sender) { TUniPanel * pan = dynamic_cast<TUniPanel*>(Sender); if(pan) { pan->Title = L"Two"; } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.