Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
DBGrid row position on screen
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
SynEdit auto End of line ...
by
eldonfsr
[
Today
at 02:52:46 am]
Scripts to generate ofici...
by
dbannon
[
Today
at 02:25:56 am]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[
Today
at 01:20:44 am]
FPC Unleashed (inline var...
by
440bx
[
Today
at 12:55:44 am]
DataPort or Synpase stat...
by
eldonfsr
[May 09, 2026, 07:51:31 pm]
TComboBoxEx & TCheckCombo...
by
Paolo
[May 09, 2026, 07:10:08 pm]
Application.QueueAsyncCal...
by
hedgehog
[May 09, 2026, 07:04:11 pm]
International Pascal Cong...
by
Mike.Cornflake
[May 09, 2026, 06:45:37 pm]
SpreadSheet Add Chart Lin...
by
eldonfsr
[May 09, 2026, 06:19:33 pm]
How do 'with' statements ...
by
Thaddy
[May 09, 2026, 05:48:50 pm]
How to view the TODO list...
by
dsiders
[May 09, 2026, 04:32:18 pm]
How to access inherited m...
by
Thaddy
[May 09, 2026, 04:12:38 pm]
Anubis activated
by
LemonParty
[May 09, 2026, 03:46:01 pm]
RunFormula: math expressi...
by
LeP
[May 09, 2026, 03:39:53 pm]
Setting canvas offset wit...
by
jamie
[May 09, 2026, 03:14:04 pm]
Limiting Search in TSelec...
by
jamie
[May 09, 2026, 03:09:21 pm]
using make with a differe...
by
Thausand
[May 09, 2026, 02:41:39 pm]
FreeBSD 13/14: RTL dirent...
by
Fred vS
[May 09, 2026, 02:33:11 pm]
Problems with form.AutoSc...
by
OH1KH
[May 09, 2026, 12:07:44 pm]
AVRPascal – free code edi...
by
ackarwow
[May 09, 2026, 09:23:14 am]
Can /my/ AI help me with ...
by
valdir.marcos
[May 09, 2026, 08:34:18 am]
Laz program on ChromeOS?
by
Thaddy
[May 09, 2026, 07:58:21 am]
Show Case: WritingTool
by
foldl2026
[May 09, 2026, 07:54:04 am]
Gtk3 widgetset - call for...
by
dbannon
[May 09, 2026, 03:23:51 am]
Is it timing of a dataset...
by
egsuh
[May 09, 2026, 02:46:11 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: DBGrid row position on screen (Read 2871 times)
regs
Jr. Member
Posts: 99
DBGrid row position on screen
«
on:
January 21, 2016, 09:19:46 pm »
Is there any way to get position of a row on a screen?
Logged
balazsszekely
Guest
Re: DBGrid row position on screen
«
Reply #1 on:
January 21, 2016, 09:59:10 pm »
@regs
What do you mean by position? X, Y coordinates of a row relative to the form or screen? Please be more specific!
Logged
regs
Jr. Member
Posts: 99
Re: DBGrid row position on screen
«
Reply #2 on:
January 22, 2016, 01:36:49 am »
yeah ControlToScreen of a row and height of a row
Logged
balazsszekely
Guest
Re: DBGrid row position on screen
«
Reply #3 on:
January 22, 2016, 05:27:05 am »
@regs
Code: Pascal
[Select]
[+]
[-]
var
ACol
,
ARow
:
Integer
;
Rect
:
TRect
;
P
:
TPoint
;
begin
ACol
:
=
3
;
ARow
:
=
14
;
Rect
:
=
DBGrid1
.
CellRect
(
ACol
,
ARow
)
;
P
.
X
:
=
Rect
.
Left
;
P
.
Y
:
=
Rect
.
Top
;
P
:
=
DBGrid1
.
ClientToParent
(
P
,
Form1
)
;
//relative to form
//P := DBGrid1.ClientToScreen(P); //relativ to screen
ShowMessage
(
IntToStr
(
P
.
X
)
+
' '
+
IntToStr
(
P
.
Y
)
)
;
Logged
regs
Jr. Member
Posts: 99
Re: DBGrid row position on screen
«
Reply #4 on:
January 23, 2016, 04:23:27 pm »
SelectedFieldRect seems to do what's needed.
«
Last Edit: January 23, 2016, 05:13:10 pm by regs
»
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
DBGrid row position on screen
TinyPortal
© 2005-2018