OnSetSileDividersPos
Example and syntax
const
//G03
cG03_TOP = 220.0;
cG03_BOTTOM = 220.0;
cG03_MIDDLE = 190.0;
cG03_SIDES = 135.0;
procedure OnSetSileDividersPos(aDoorLeaf:TSileDoorLeafWrapper);
var
vHori,vVert:TSileDividerWrapper;
vPos:extended;
vHeight,vWidth:extended;
i:integer;
begin
vHeight := aDoorLeaf.Height;
vWidth := aDoorLeaf.Width;
if (aDoorLeaf.VariantItem.S1 = 'MA G03') then
begin
//Horizontal
for i := 0 to aDoorLeaf.HorizontalCount - 1 do
begin
vHori := aDoorLeaf.Horizontals[i];
vPos := 0;
//Num from bottom to top. Pos from top
case vHori.Num of
4 : vPos := cG03_TOP - (vHori.Width/2);
3 : vPos := (vHeight/2) - (cG03_MIDDLE/2) + (vHori.Width/2);
2 : vPos := (vHeight/2) + (cG03_MIDDLE/2) - (vHori.Width/2);
1 : vPos := vHeight - cG03_BOTTOM + (vHori.Width/2);
end;
if vPos <> 0 then //Position from top of inner sash area
vPos := vPos - aDoorLeaf.TopElement.Width;
vHori.Position := vPos;
end;
//Vertical
for i := 0 to aDoorLeaf.VerticalCount - 1 do
begin
vVert := aDoorLeaf.Verticals[i];
vPos := 0;
//Num from right to left. Pos from left
case vVert.Num of
2 : vPos := cG03_SIDES - (vVert.Width/2);
1 : vPos := vWidth - cG03_SIDES + (vVert.Width/2);
end;
if vPos <> 0 then //Position from left of inner sash area
vPos := vPos - aDoorLeaf.LeftElement.Width;
vVert.Position := vPos;
end;
end;
//other doorleafs...
end;Last updated