Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
[SOLVED] Scrollbox Controlatpos
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
Parametrized Access SQL Q...
by
Khrys
[
Today
at 07:12:03 am]
How to set the Excel cell...
by
dodgex
[
Today
at 06:01:11 am]
BS PanelTrans - transform...
by
Xenno
[
Today
at 05:54:55 am]
Why does FPC behave this ...
by
440bx
[
Today
at 04:41:50 am]
PngDrop: Reduce the size ...
by
ALLIGATOR
[
Today
at 04:05:04 am]
RTTIPropertyGrid expand
by
jamie
[
Today
at 03:17:43 am]
What was your first compu...
by
TBMan
[
Today
at 02:19:55 am]
Fantasy Worldbuilder; Pro...
by
Boleeman
[
Today
at 01:28:33 am]
Sum GNU Anti Reversi 8x8 ...
by
Boleeman
[
Today
at 12:42:53 am]
StrToDateTime problems
by
andyH
[
Today
at 12:28:42 am]
How to forward a Class in...
by
Bart
[January 12, 2026, 10:35:22 pm]
Picture Process with BGRA...
by
circular
[January 12, 2026, 08:05:53 pm]
[SOLVED] Average color
by
LeP
[January 12, 2026, 06:51:24 pm]
set zero values not to b...
by
wp
[January 12, 2026, 06:25:48 pm]
HELP Why the WriteRowHeig...
by
wp
[January 12, 2026, 06:22:24 pm]
building a Calculator usi...
by
Dzandaa
[January 12, 2026, 03:51:20 pm]
How can Lazarus implement...
by
Tommi
[January 12, 2026, 03:46:47 pm]
how to relay a button cli...
by
srvaldez
[January 12, 2026, 01:15:46 pm]
what was your first pasca...
by
BSaidus
[January 12, 2026, 01:01:32 pm]
[SOLVED] Transparent back...
by
alpine
[January 12, 2026, 11:28:56 am]
Lazarus and Libre Office
by
sydenis
[January 12, 2026, 11:07:38 am]
[SOLVED] Able to access p...
by
vinntec
[January 12, 2026, 09:27:53 am]
How to execute PKZIPC fro...
by
Hozso
[January 12, 2026, 08:17:36 am]
Jerky animation (windows)
by
Roland57
[January 12, 2026, 07:19:29 am]
RPNCalc in Lazarus
by
tailkinker
[January 12, 2026, 04:42:09 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Scrollbox Controlatpos (Read 3996 times)
pcurtis
Hero Member
Posts: 951
[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: 1820
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: 951
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