Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
[SOLVED] Scrollbox Controlatpos
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
DPI/PPI on Windows
by
Alienizering
[
Today
at 12:59:34 am]
MOVED: Strange behavior T...
by
trev
[
Today
at 12:50:40 am]
MOVED: DPI/PPI on Windows
by
trev
[
Today
at 12:49:03 am]
Strange behavior TFontDia...
by
zoltanleo
[May 17, 2022, 11:58:18 pm]
Can't create new LAMW Pro...
by
Sirius Black
[May 17, 2022, 11:43:35 pm]
Remote debugging on Raspb...
by
MarkMLl
[May 17, 2022, 10:54:23 pm]
lazarus "i18n" PO Output ...
by
CCRDude
[May 17, 2022, 08:36:27 pm]
How to show TForm from Qt...
by
Dio Affriza
[May 17, 2022, 06:58:03 pm]
Optimizing the counter co...
by
BrunoK
[May 17, 2022, 06:06:24 pm]
about sqldb postgresql LO...
by
MarkMLl
[May 17, 2022, 05:41:33 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Scrollbox Controlatpos (Read 3342 times)
pcurtis
Hero Member
Posts: 935
[SOLVED] Scrollbox Controlatpos
«
on:
December 09, 2021, 04:03:57 am »
How do I get TScrollbox.Controlatpos to work? See attachment.
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
Button1Click
(
Sender
:
TObject
)
;
var
aPoint
:
TPoint
;
begin
aPoint
.
X
:
=
20
;
aPoint
.
Y
:
=
20
;
Caption
:
=
Scrollbox1
.
ControlAtPos
(
aPoint
,
True
)
.
ClassName
;
end
;
Gives a SIGSEGV
Test app attached
«
Last Edit: December 09, 2021, 09:42:55 am by pcurtis
»
Logged
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2
zeljko
Hero Member
Posts: 1249
Re: Scrollbox Controlatpos
«
Reply #1 on:
December 09, 2021, 09:33:00 am »
Maybe you should call ControlAtPos(aPoint, True).ClassName; like ControlAtPos(aPoint, True, True).ClassName; if your child controls are TWinControls. SIGSEGV is because result of ControlAtPos() is Nil.
Logged
pcurtis
Hero Member
Posts: 935
Re: Scrollbox Controlatpos
«
Reply #2 on:
December 09, 2021, 09:41:53 am »
Thanks. It works.
Logged
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
[SOLVED] Scrollbox Controlatpos
TinyPortal
© 2005-2018