Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.02.25;
Скачать: 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 вся ветка

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

Наверх




Память: 0.48 MB
Время: 0.035 c
1-79946
Ученик2
2004-02-11 17:58
2004.02.25
Функция, убирающая пробелы в строке


14-80127
MonStar
2004-02-02 10:21
2004.02.25
FА как вам такая задачка?


7-80311
alligator
2003-12-05 17:14
2004.02.25
BIOS и CMOS


1-79988
AGN
2004-02-13 09:52
2004.02.25
Ctrl+F


3-79662
Вованчик
2004-02-03 08:01
2004.02.25
снова IBUpdateSQL