Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Styles    [ Add a report in this area ]  
Report #:  106256   Status: Open
Minimizing custom styled form messes up form constraints
Project:  Delphi Build #:  16.0.4504.48759
Version:    16.4 Submitted By:   Dalija Prasnikar
Report Type:  Basic functionality failure Date Reported:  6/7/2012 1:48:41 PM
Severity:    Serious / Highly visible problem Last Updated: 6/11/2012 12:12:24 AM
Platform:    All versions Internal Tracking #:   28884
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
3.00 out of 5
Total Votes: 14
Description
Minimizing custom styled form changes form constraints.

Under default Windows style, everything works as expected
Steps to Reproduce:
1. Run attached project.
    Constraints property is set as below at design time.
      Constraints.MinHeight = 300
      Constraints.MinWidth = 300

2. Constraints value are written in form caption
-----
procedure TForm1.FormCreate(Sender: TObject);
begin
  Caption := IntToStr(Constraints.MinWidth) + 'x' + IntToStr(Constraints.MinHeight);
end;
-----
[output]
Caption is '300x300'

3. Minimize form

4. Restore form

5. Click on button - form constraints are no longer the same
-----
procedure TForm1.Button1Click(Sender: TObject);
begin
  Caption := IntToStr(Constraints.MinWidth) + 'x' + IntToStr(Constraints.MinHeight);
  WindowState := wsNormal;
  SetBounds(Left, Top, Constraints.MinWidth, Constraints.MinHeight);
end;
-----
[output]
Caption is '160x27'
Workarounds
None
Attachment
StyledFormConstraints.zip
Comments

Tomohiro Takahashi at 6/11/2012 7:46:24 PM -
This report was opened with valid Internal Tracking Number.
Thanks.

Server Response from: ETNACODE01