Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.03.28;
Скачать: CL | DM;

Вниз

Курсор мыши в StringGrid???   Найти похожие ветки 

 
Mishenka   (2004-03-10 21:43) [0]

Как в StringGrid"e узнать над какой ячейкой курсор мыши в данный момент?


 
Гаврила   (2004-03-10 21:46) [1]

StringGrid1.MouseToCell


 
P.N.P. ©   (2004-03-10 21:55) [2]

F1 Returns the row and column indexes of the cell that contains a point specified in screen coordinates

procedure TForm1.StringGrid1MouseMove(Sender: TObject; Shift: TShiftState;
 X, Y: Integer);
var xx,yy:integer;
begin
xx:=StringGrid1.MouseCoord(x,y).X;
yy:=StringGrid1.MouseCoord(x,y).Y;
StringGrid1.Cells[xx,yy]:="s";
end;


 
Goorus   (2004-03-11 12:45) [3]

В крайнем случае


procedure TForm1.StringGrid1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
x:=X div StringGrid1.CellWidth;
y:=Y div StringGrid1.CellHeight;
StringGrid1.Cells[x,y]:="text";
end;


 
wisekaa ©   (2004-03-11 12:57) [4]


> P.N.P. ©   (10.03.04 21:55) [2]

Потенцальную ошибку в своем коде видишь?


 
wisekaa ©   (2004-03-11 13:02) [5]


> Mishenka   (10.03.04 21:43)

procedure TForm1.StringGrid1MouseMove(Sender: TObject; Shift: TShiftState;
 X, Y: Integer);
var Col,Row:integer;
begin
StringGrid1.MouseToCell(X,Y,Col,Row);
if (Col >= 0) and (Row >= 0) then StringGrid1.Cells[Col,Row]:=IntToStr(Col)+"-"+IntToStr(Row);
end;



Страницы: 1 вся ветка

Текущий архив: 2004.03.28;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.024 c
7-1070382483
NavigatorV
2003-12-02 19:28
2004.03.28
Выход из Windows


3-1077801035
Visma_Denis
2004-02-26 16:10
2004.03.28
Изменяя Комбо изменять записи....


3-1077112533
Rumba
2004-02-18 16:55
2004.03.28
Как считать текстовый файл в VARCHAR(1500)?


1-1078404018
KapitanSerg
2004-03-04 15:40
2004.03.28
Фонт и фон в TStringGrid


3-1077519843
lightix
2004-02-23 10:04
2004.03.28
Сообщения об ошибках Oracle