Вниз
Скачать: 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 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.028 c
7-1073908494
S@shka
2004-01-12 14:54
2004.03.28
Есть ли люди работающие с TApdComPOrt?


1-1078474460
stainer
2004-03-05 11:14
2004.03.28
меню в стиле offce xp


4-1073750512
tytus
2004-01-10 19:01
2004.03.28
Пуск-Программы .


8-1069692319
g-l-u-k
2003-11-24 19:45
2004.03.28
Bass.dll и M3U


4-1074257856
DillerXX
2004-01-16 15:57
2004.03.28
Фоновое приложение №2...




   Наверх