Hiph DPI issue with a memo in a groupbox lazarus / 31-LCL ---------------------------------------------------------------------- Lagavulin16 · 2012-11-28 18:13 (Win 7 x86, Lazarus 1.02, FPC 2.6.0) With the default 96 DPI setting: Place a groupbox on a form and a memo inside the groupbox. Set the Top property of the memo to zero. Add a FormCreate procedure that scales form and controls if the DPI setting is bigger than 96. Compile/run. Result as expected (see attachment DPI96.jpg). Now change the DPI setting to 192 (200%) using Windows Control Panel. Reboot (you have to) and start the program again. Bad news: the space assigned for the groupbox caption is gone. The upper part of the memo truncates/overwrites the caption (see attachment DPI192.jpg). Any idea(s) what's going wrong? (source code for testing see attachment DPI_sources.zip) ---------------------------------------------------------------------- lainz · 2012-11-28 19:12 Try this: http://wiki.lazarus.freepascal.org/High_DPI#Example_-_Using_AutoSize I need to rewrite the article... More here: http://wiki.lazarus.freepascal.org/Autosize_/_Layout http://wiki.lazarus.freepascal.org/LCL_AutoSizing Is not easy, I must say, to find the appropriate mix of settings, you will lose time, but finally you will get the result you need. ---------------------------------------------------------------------- Lagavulin16 · 2012-11-28 23:14 lainz, thanks for all the links, but I've read these articles/tutorials a couple of days ago and tried a lot of setting. It doesn't work, though. I think there's a bug somewhere, because if you only scale the form and let the controls stay untouched, the same thing happens. Somehow the rect holding the groupbox caption gets lost when re- calculating/re-positioning the client rect with high DPI. Quote from: lainz on November 28, 2012, 08:12:41 pm... Is not easy, I must say, to find the appropriate mix of settings, you will lose time, but finally you will get the result you need. That's exactly the point that probably will get me back to D7. Some monhs ago when I started using Lazarus I was _really_ impressed. But now, having faced a couple of these "you'll loose (a lot) time because you have to find out by trial & error", I'm getting more and more dissapointed... ---------------------------------------------------------------------- lainz · 2012-11-29 23:01 D7 has HighDPI support? Only a question, in the other DPI settings (120% & 144%) the bug is the same? If not (or if yes) please report it in the bugtracker, I've reported 'a lot' of HighDPI bugs, and there is one in the TMainMenu that was fixed only up to 144%, 200% or more are buggy. ---------------------------------------------------------------------- Lagavulin16 · 2012-11-30 13:40 Quote from: lainz on November 30, 2012, 12:01:26 amD7 has HighDPI support? No, but using some "tricks" it can be done (at least it worked in my programs). Quote from: lainz on November 30, 2012, 12:01:26 amOnly a question, in the other DPI settings (120% & 144%) the bug is the same? See attached screenshots... I tried to find the place in code where the offset groupbox client rec to groupbox top is calculated/set, but didn't succeed. ---------------------------------------------------------------------- lainz · 2012-11-30 19:19 Ok try to set position to zero on create event. If doesn't works, report in the bugtracker.