| Код | #include <vcl.h> #pragma hdrstop
#include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; int start_col, start_row; int end_col, end_row;
//--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::StringGrid1MouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { int Column1;
StringGrid1->MouseToCell(X, Y, end_col, end_row); if ((end_col == start_col) && (end_row == start_row)) return;
for(Column1 = end_col; end_col > start_col-1; --end_col) StringGrid1->Cells[end_col][end_row] = "*"; } //--------------------------------------------------------------------------- void __fastcall TForm1::StringGrid1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { StringGrid1->MouseToCell(X, Y, start_col, start_row); }
|
|