It's the GUI library he's working on:

http://www.pascalgamedevelopment.com...UI-Another-GUI

Keep in mind that we won't give you copy-pastable sollutions to your problems. The code snippet phibermon provided is from his own library and shows the way he fixed the issue. You have to study it for yourself and then try improve your own code.