Recent

Author Topic: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem  (Read 11268 times)

BSaidus

  • Hero Member
  • *****
  • Posts: 545
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« on: August 14, 2017, 12:50:37 pm »
Here is a screenshoot .. after clicking the button.
It only happen when Editor not focused.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #1 on: August 14, 2017, 01:38:13 pm »
It only happen when Editor not focused.
Form has hidden the editor window. Does it happen when not focused editor window is shown?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #2 on: August 14, 2017, 01:46:03 pm »
Confirmed for trunk when using Sparta docked form editor.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

BSaidus

  • Hero Member
  • *****
  • Posts: 545
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #3 on: August 14, 2017, 02:47:02 pm »
It only happen when Editor not focused.
Form has hidden the editor window. Does it happen when not focused editor window is shown?
As the Pics shows, only happen when the Tab Form selected (Focus on the TAB Form) and it works well when the Editor is focused (Just tested with spata_form & anchordocs installed ) .


lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #4 on: August 14, 2017, 03:56:14 pm »
lot of bugs in lazarus.

just another anoying example

by past i was used to locate form on screen by

    Left:=Screen.WorkAreaRect.Righ-Self.Width;
    Top:=Screen.WorkAreaRect.Bottom-Self.Height;

to position my form on the bottom right of the screen

for now, width=clientwidth and height=clientheight

so the form draws parts OUT OF THE SCREEN

I guess its not only on windows and it is a bug! because by past it worked FINE

and clientwidth can not be equal to width due to the borders size
clientheight can not be equal to height due to the borders and caption sizes

so!

im afraid to get a bitbamp pic of my form and ask for its size (it exists a method in TForm to get a bitmap from itself) and ask for bitmap size is not a cool trick to position a form
« Last Edit: August 15, 2017, 04:25:46 am by sam707 »

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #5 on: August 14, 2017, 04:01:15 pm »
just put a form and a procedure

procedure TForm.dummy;
var l,v: integer;
begin
 v:=width-clientwidth;
 l:=height-clientheight;
end;

debug and watch the magnificeent ZERO results in v and l hahahahah
« Last Edit: August 14, 2017, 04:03:01 pm by sam707 »

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #6 on: August 14, 2017, 04:07:38 pm »
TCustomForm.GetFormImage is the bitmap getter

to crunch time, resources, and finally get the right sizes

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #7 on: August 14, 2017, 09:25:05 pm »
It only happen when Editor not focused.
Form has hidden the editor window. Does it happen when not focused editor window is shown?
As the Pics shows, only happen when the Tab Form selected (Focus on the TAB Form) and it works well when the Editor is focused (Just tested with spata_form & anchordocs installed ) .

Did you report it on mantis? If not, please do so.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #8 on: August 14, 2017, 09:42:37 pm »
lot of bugs in lazarus.
Where?
Quote
just another anoying example

by past i was used to locate form on screen by

    Left:=Screen.WorkAreaRect.Right-width-Self.Width;
    Top:=Screen.WorkAreaRect.Right-height-Self.Height;

to position my form on the bottom right of the screen

for now, width=clientwidth and height=clientheight

so the form draws parts OUT OF THE SCREEN
Yes, that is correct... It is the FORM client, not the SCREEN client....
That's intended behavior and Delphi compatible...
In the past Lazarus could not handle this case correctly (multi-monitor setup)
The client area is independent of the screen, that is not a bug. Your code is wrong.
« Last Edit: August 14, 2017, 09:46:31 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #9 on: August 14, 2017, 11:31:13 pm »
c'mon i made it work properly from delphi 3.5 to xe2 :D (that is more than 15 years long)

otherwise WHAT THE F... need for clientwidth and width properties if they are the same?????????
(optimize and remove the unwanted from the form class if so)
stop being chrumpy LOL

width and height = sizes with os 'decorattions'
clientwidth and clientheight = inside sizes

I dont plan to reinstall xe2 but i am pretty sure I AM F... RIGHT
because last year I positioned forms on screen with my method and they werent drawn part outside like with laz
(C++ builder using VCL from delphi xe2, by a client and friend of mine)
« Last Edit: August 14, 2017, 11:42:33 pm by sam707 »

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #10 on: August 14, 2017, 11:48:40 pm »
i'm not against the fact to remove trailing useless redundant properties.

so if width and clientwidth, height and clientheight, manage the same values, laz team can remove the redundant ones, and optimize! no problem.

but in the case they want to keep 'hem, the properties should act as i mentioned :

benefit?
1) true forms alignements with no headache
2) retreive size of nonclient areas with simple code

vertbordersize;=(width-clientwidth) div 2;  // for example
captionheight:=height-bordersize-clientheight;

I already used computations like that past years, im not poping them from a magic hat LOL
« Last Edit: August 14, 2017, 11:53:45 pm by sam707 »

sam707

  • Guest
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #11 on: August 15, 2017, 02:47:51 am »
furthermore, we need difference between width and clientwidth (Hheight/clientheight) if we decide to turn our apps into awesome guis with non rectangular forms. SO if delphi is bad when firemonkey is used, why would laz enter the bad way?

simple Eliptic Form without drop shadow

Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   ABitmap: TBitmap;
  4. begin
  5.   // Hide the titlebar
  6.   BorderStyle:=bsNone;
  7.   ABitmap := TBitmap.Create;
  8.   ABitmap.Monochrome := True;
  9.   ABitmap.Width := Width; // or Form1.Width
  10.   ABitmap.Height := Height; // or Form1.Height
  11.  
  12.   // We set the background as black (which will be transparent)
  13.   ABitmap.Canvas.Brush.Color:=clBlack;
  14.   ABitmap.Canvas.FillRect(0, 0, Width, Height);
  15.  
  16.   // Now we draw our shape in White
  17.   ABitmap.Canvas.Brush.Color:=clWhite;
  18.   ABitmap.Canvas.Ellipse(0, 0, Width, Height);
  19.   //Canvas.Draw(0,0,ABitmap);
  20.   SetShape(ABitmap);
  21.  
  22.   ABitmap.Free;
  23. end;

in the above example, all went good with laz 0.9.xx today it shrinks to client frame
« Last Edit: August 15, 2017, 02:52:10 am by sam707 »

sam707

  • Guest
« Last Edit: August 15, 2017, 05:00:48 am by sam707 »

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 220
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #13 on: August 15, 2017, 09:17:36 am »
sam707. What's wrong with you? Please read http://wiki.freepascal.org/Lazarus_1.8.0_release_notes. Especially the "LCL changes -> TCustomForm" part .

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: Lazrus-1.8.0RC4-fpc-3.0.4RC1 IDE problem
« Reply #14 on: August 15, 2017, 11:33:19 am »
And that makes it checkmate... not chessmade or something..
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018