Вниз
Скачать: CL | DM;

Как можно узнать по какой строке в TStringGrid произвели щелчок??   Найти похожие ветки 

 
Lisa ©   (2004-02-10 09:57) [0]

Скажите, плиз, как можно определить по какой строке в TStringGrid произвели щелчок?


 
Семен Сорокин ©   (2004-02-10 09:59) [1]

MouseToCell


 
Anatoly Podgoretsky ©   (2004-02-10 10:00) [2]

MouseToCell, OnSelectCell, OnClick


 
Lisa ©   (2004-02-10 10:06) [3]

простите, но я не совсем поняла:
предположим, что программа отлавливает DoubleClick в StringGrid"e, а потом должна выяснить на какой строчке это произошло - как в таком случае использовать, к примеру, MouseToCell, который ничего не возвращает?


 
Семен Сорокин ©   (2004-02-10 10:09) [4]

это из Help"а:

This example uses a string grid on a form. When the user selects a cell in the grid and releases the mouse button, the column and row coordinates for the cell appear in the cell. The code for displaying the coordinates is written in the OnMouseUp event handler:

procedure TForm1.FormCreate(Sender: TObject);

begin
StringGrid1.DefaultColWidth := 100;
end;
procedure TForm1.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
Column, Row: Longint;
begin
StringGrid1.MouseToCell(X, Y, Column, Row);
StringGrid1.Cells[Column, Row] := "Col " + IntToStr(Column) +
",Row " + IntToStr(Row);

end;


 
Никто   (2004-02-10 10:10) [5]

function TDBGrid.MouseCoord(X, Y): TGridCoord;


 
Anatoly Podgoretsky ©   (2004-02-10 10:21) [6]

Lisa © (10.02.04 10:06) [3]
Если DoubleClick пойман, то COL/ROW уже указывает на ячейку



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

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



Память: 0.46 MB
Время: 0.039 c
7-80331
maya
2003-12-03 12:45
2004.02.25
Event Viewer


3-79584
KADAN
2004-01-29 09:37
2004.02.25
Float поля в DBase


3-79569
venus
2004-01-29 15:47
2004.02.25
DBGrid


7-80300
Net_Prosto
2003-12-08 18:46
2004.02.25
Блокировка клавиатуры и мыши под системой XP


14-80131
il
2004-02-02 15:03
2004.02.25
Где найти бесплатный web-сервис, публикующий курсы валют?




   Наверх