Mega Code Archive

 
Categories / Delphi / VCL
 

Dbcell koordinatlarını nasıl buluruz

---http://delphi.about.com--- ---From:Zarko Gajic--- Bu kod size Cursor’un hangi hücre üzerinde olduğunu ve başlık “titlebar” nasıl değiştirileceğini gösterir: procedure TForm1.GridMouseMove (Sender: TObject; Shift: TShiftState; X, Y: Integer) ; var pt: TGridcoord; begin pt:= Grid.MouseCoord( x, y ) ; //başlık üzerindeyken cursoru değiştir if pt.y=0 then Grid.Cursor:=crHandPoint else Grid.Cursor:=crDefault; If pt.X > 0 Then Caption := Format( 'col: %d, row: %d, title: %s', [pt.x, pt.y, Grid.columns[pt.x-1].title.caption] ) Else Caption := Format( 'col: %d, row: %d',[pt.x, pt.y] ) ; end;