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
Read JSON names
by
AlexTP
[
Today
at 10:31:53 am]
Lazarus Release 2.2.2
by
JuhaManninen
[
Today
at 10:04:05 am]
Frame reception problem i...
by
ccrause
[
Today
at 07:49:34 am]
Raylib4.0 don't work eith...
by
lestroso
[
Today
at 07:32:11 am]
installation warning
by
trev
[
Today
at 03:54:49 am]
Help needed for usage of ...
by
william
[
Today
at 03:33:06 am]
Open Application with sta...
by
speter
[
Today
at 02:40:23 am]
MOVED: Frame reception pr...
by
trev
[
Today
at 01:23:12 am]
MOVED: Regex conversion e...
by
trev
[
Today
at 01:20:23 am]
MOVED: Raylib4.0 don't wo...
by
trev
[
Today
at 01:19:51 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Scrollbox Controlatpos (Read 3348 times)
pcurtis
Hero Member
Posts: 939
[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: 1251
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: 939
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