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
How to define a type of ...
by
Fibonacci
[
Today
at 03:22:26 am]
IndySecOpenSSL is now ava...
by
TheMouseAUS
[
Today
at 03:10:23 am]
Discipline your AI coding...
by
440bx
[
Today
at 02:44:06 am]
Version 4.8 was recently ...
by
Ten_Mile_Hike
[
Today
at 01:43:17 am]
Who can explain this ?
by
J-G
[
Today
at 01:02:01 am]
FPC Unleashed (inline var...
by
Fibonacci
[
Today
at 12:03:13 am]
[New Component] ExtTabCtr...
by
d7_2_laz
[June 10, 2026, 10:52:55 pm]
Conscious Artificial Inte...
by
schuler
[June 10, 2026, 09:11:29 pm]
TDWEdit
by
Ed78z
[June 10, 2026, 08:24:43 pm]
Trayslate 1.3.0 - Free tr...
by
AlexanderT
[June 10, 2026, 08:12:24 pm]
TShellListView
by
Ed78z
[June 10, 2026, 07:59:41 pm]
[SOLVED] Curious why this...
by
1HuntnMan
[June 10, 2026, 07:53:21 pm]
Toying Pascal Documenting...
by
paule32
[June 10, 2026, 05:22:32 pm]
Gitlab site history date.
by
Fred vS
[June 10, 2026, 05:07:59 pm]
Cursor changes to arrow o...
by
atlatl
[June 10, 2026, 05:02:45 pm]
Sizes and SizeInt
by
440bx
[June 10, 2026, 02:15:13 pm]
how to add a ForEach call...
by
jamie
[June 10, 2026, 12:42:04 pm]
XLibre, finally and fortu...
by
kagamma
[June 10, 2026, 12:15:10 pm]
[SOLVED] Watches panel is...
by
CM630
[June 10, 2026, 12:06:33 pm]
How to monitor changes in...
by
Martin_fr
[June 10, 2026, 11:55:18 am]
Printer Info
by
J-G
[June 10, 2026, 11:26:52 am]
Strange Behaviour at Runt...
by
andrew Bubble
[June 10, 2026, 11:19:45 am]
Can I get the position an...
by
CM630
[June 10, 2026, 11:00:33 am]
WEBP, no DLLs
by
CM630
[June 10, 2026, 08:52:43 am]
Dataset EnableControls/Di...
by
Sharfik
[June 10, 2026, 07:40:21 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: DBGrid row position on screen (Read 2875 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