Skip to main content

TcxCustomSplitter.InvertDirection Property

Specifies the hot zone orientation.

Declaration

property InvertDirection: Boolean read; write; default False;

Property Value

Type Default
Boolean False

Remarks

Most of the available hot zones display arrows that point to the direction in which the control will be resized if the hot zone is clicked. However, you can force these arrows to point in the opposite direction. This is useful, if you create a popout control. For this, the splitter control resides at a form edge and when the hot zone is clicked, the form is enlarged to accommodate the splitter’s bound control. The splitter remains at its original position in this case. To implement such behavior, handle the splitter’s OnAfterOpen and OnAfterClose events as shown below.

procedure TForm1.FormCreate(Sender: TObject);
begin
  cxSplitter1.CloseSplitter;
  cxSplitter1.AutoPosition := False;
  cxSplitter1.PositionAfterOpen := 100;
  cxSplitter1.InvertDirection := True;
end;
procedure TForm1.cxSplitter1AfterOpen(Sender: TObject);
begin
  SetBounds(Left - 100, Top, Width + 100, Height);
end;
procedure TForm1.cxSplitter1AfterClose(Sender: TObject);
begin
  SetBounds(Left + 100, Top, Width - 100, Height);
end;

The form can look as shown below. Note that the hot zone’s arrow points to where the popout control will appear. This is achieved by setting the InvertDirection property to True at form creation.

The default value of the InvertDirection property is False.

See Also