I wonder how to center all the controls in a fullscreen window. I have a main form and TPanel.
I need that TPanel always be in a form center when I resize it.
Sorry for the delay, I don't check the SourceForge website much for support questions. Please try and use the fpGUI newsgroups instead - if you can. Details are on the fpGUI website.
Anyway, there are a few ways to do what you want:
1) Create a OnResize event handler for that form. Inside that, calculate the new Panel position, and call
2) or position the Panel in the center of the form, set all four Anchors on the Panel. When the form
resizes, the Panel will resize accordingly, but still stay center
3) or position the Panel in the center of the form, then unset all Anchors of the Panel. When the form
resizes, the Panel will stay centered, but *not* resize like it did in (2).
Hope that helps.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.