Watch, Follow, &
Connect with Us
Public Report
Report From: Kylix/VCLX/TForm    [ Add a report in this area ]  
Report #:  3536   Status: Open
TForm.Left and TFom.Top return wrong values.
Project:  Kylix Build #:  4.186
Version:    3.0 Submitted By:   Martin Schreiber
Report Type:  Minor failure / Design problem Date Reported:  2/14/2003 10:01:13 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    Kylix Pascal IDE Internal Tracking #:   155952
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (2 Total Ratings)
4.50 out of 5
Total Votes: None
Description
QForms.TForm.Left and Top return wrong values in Object Inspector and at runtime, see steps and attachments.

Problem:

After the window frame is decorated, Qt sends a QEventType_Move Event which calls QControls.TWidgetControl.UpdateBounds. QWidget_Geometry is from left = 400, top = 200 shifted to left = 404, top = 220 in the example. In TWidgetControl.AdjustForFrame -> QControls.AdjustForFrame QWidget_frameGeometry is same as QWidget_Geometry (Qt bug?) -> AdjustForFrame fails.

By a later call of AdjustForFrame the error will be corrected.

This is with Suse 8.1, KDE 3.0.3
Steps to Reproduce:
1. Open the attached project in IDE.
2. Set Form1.Left to 400, top to 200
3. Run the project.
4. Note: Left = 404, Top = 220 -> error.
5. Change Size of Form1 with mouse.
6. Left = 400, Top = 200, ok.
7. Close Form1
8. Note: in Object Inspector Form1.Left = 404, Top = 220 -> error.
9. Change size of Form1 with mouse.
10. In Object Inspector Form1.Left = 400, Top = 200.
Workarounds
None
Attachment
3536.zip
Comments

Matthias Thoma at 2/22/2003 2:25:49 PM -
I can reproduce that on different KDE versions.

Andrew Fionik at 3/14/2003 4:10:15 AM -
Interesting, why not anyone inside Borland QA team has not noticed this bug. It was since K1.

Server Response from: ETNACODE01