Bug #3191
Inconsistent Z-order for decorations
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/02/2016
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version:
History
#1 Updated by Stanislav Lomany over 7 years ago
- File wrong-z-order.png added
AbstractContainer.normalizeZOrder
is executed when the frame become realized. And z-ordering normalization affects only widgets which were added to the frame at this point.
So we need to normalize the order when a widget is added to a realized frame, or something like that.
Example:
DEF VAR fr1 AS HANDLE. DEF VAR fr2 AS HANDLE. DEF VAR btn AS HANDLE. def var recth as handle. DEF VAR btn2 AS HANDLE. def var recth2 as handle. hide all. clear all. CREATE FRAME fr1. ASSIGN fr1:WIDTH = 50 fr1:HEIGHT = 8 fr1:TITLE = "Frame 1". create button btn assign frame = fr1 label = "Dynamic button" sensitive = true x = 10 y = 10 VISIBLE = TRUE. create rectangle recth assign frame = fr1 X = 20 Y = 20 WIDTH = 30 HEIGHT = 3 VISIBLE = TRUE SENSITIVE = TRUE. CREATE FRAME fr2. ASSIGN fr2:WIDTH = 50 fr2:HEIGHT = 6 fr2:Y = 200 fr2:TITLE = "Frame 2". create rectangle recth assign frame = fr2 X = 20 Y = 20 WIDTH = 30 HEIGHT = 3 SENSITIVE = TRUE VISIBLE = TRUE. create button btn2 assign frame = fr2 label = "Dynamic button 2" sensitive = true x = 10 y = 10 visible = true. WAIT-FOR CLOSE OF CURRENT-WINDOW.