Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void __fastcall TForm18::StringGrid1DrawCell(TObject *Sender, int ACol, int ARow,
- TRect &Rect, TGridDrawState State)
- {
- Graphics::TBitmap * Bitmap = new Graphics::TBitmap;
- TJPEGImage * examp = new TJPEGImage;
- examp->LoadFromFile("C:\\Users\\Admin\\Documents\\Embarcadero\\Studio\\Projects\\Курсач\\Win32\\Debug\\Folder.jpg");
- Bitmap->Assign(examp);
- int a = DirectoryListBox1->Count - DirectoryListBox1->ItemIndex;
- for (int i = 2; i <= DirectoryListBox1->Count - DirectoryListBox1->ItemIndex; i++)
- if(ARow == i && ACol == 0)
- {
- StringGrid1->ColWidths[ACol] = Bitmap->Width;
- StringGrid1->RowHeights[ARow] = Bitmap->Height;
- StringGrid1->Canvas->StretchDraw(Rect, Bitmap);
- }
- delete examp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement