Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. void __fastcall TForm2::Exit1Click(TObject *Sender)
  2. {
  3.     Application->Terminate();
  4. }
  5. //---------------------------------------------------------------------------
  6. void __fastcall TForm2::ListView1SelectItem(TObject *Sender, TListItem *Item, bool Selected)
  7. {
  8.     if ( Selected ) {
  9.         //ShowMessage( Item->Caption );
  10.         TStyleManager::SetStyle( Item->Caption );
  11.     }
  12. }
  13. //---------------------------------------------------------------------------
  14. void __fastcall TForm2::FormCreate(TObject *Sender)
  15. {
  16.     int iNumStyles = TStyleManager::StyleNames.get_length();
  17.  
  18.     ListView1->Items->Clear();
  19.     for ( int i = 0; i < iNumStyles; i++ ) {
  20.         UnicodeString sStyle = TStyleManager::StyleNames[i];
  21.         TListItem* item = ListView1->Items->Add();
  22.         item->Caption = sStyle;
  23.         //TStyleManager::SetStyle( sStyle );
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement