Recent

Author Topic: TForm.Position MainFormCenter must be fixed in LCL to avoid out of screen  (Read 1935 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Main window shows on the bottom.
Next window is with MainFormCenter position. Its opened too low, and partly out of screen.
Win10.
Can you fix position of 2nd window?
Picture.
« Last Edit: November 22, 2018, 06:23:55 pm by Alextp »

jamie

  • Hero Member
  • *****
  • Posts: 6090
So what is the problem?

  Looks like it is doing exactly what it should be..?
 
  If you don't want your form to follow the center position of the parent then use another approach maybe?

  There are apps that intentionally move a form off the top or bottom of the screen but keep it active, if you are
purposing to change this ability then you'll be introducing more issues rather then simply using the provided
code to make your app do as you wish.

  Like I said, its best to use existing functionality to make your app do as you wish, but it may not be what
others want to get pushed to do..

 If it was something that had no recourse with provided code in the LCL then I would fully agree to fix it..

P.S.
   I think the LCL is overly larded as it is and some of it should go on a diet especially in the TFORM area.
   Just my opinion.


« Last Edit: November 22, 2018, 04:29:00 pm by jamie »
The only true wisdom is knowing you know nothing

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Problem is window partially out of screen. LCL can move it upper

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Problem is window partially out of screen. LCL can move it upper

And so can you. Bottom line is that when you specify that Position is MainFormCenter the LCL can't guess that you really meant "MainFormCenter except when that would show some of the form off-screen in which case ...", because that may not be what other developers want in their applications. So it does what you said you wanted. :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018