IDimensionViewer.AdjustWidthOnlyVisible

Fore Syntax

AdjustWidthOnlyVisible: Boolean;

Fore.NET Syntax

AdjustWidthOnlyVisible: boolean;

Description

The AdjustWidthOnlyVisible property determines the mode of column width autofit.

Comments

Available values:

To autofit the width, double-click the column between borders or use the IDimensionViewer.AdjustWidth method.

Fore Example

Executing the example requires a form with the button named Button1 on it, the DimensionTree component named DimensionTree1 and the UiDimension component that is a data source for DimensionTree1. A dictionary is linked to UiDimension.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
    DimensionTree1.ShowColumnHeaders := True;
    DimensionTree1.AdjustWidthOnlyVisible := True;
    DimensionTree1.HighlightTrack := False;
    DimensionTree1.ShowHeaderButton := True;
    DimensionTree1.AdjustWidth(0);
    DimensionTree1.UseSystemImages := True;
End Sub Button1OnClick;

Clicking the button displays column headers and a button that opens column headers menu, width of the first column is autofitted considering only visible elements, elements highlighting on hover is disabled; standard icons are used in the DimensionTree1 component.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Begin
    dimensionTreeNet1.CtrlBox.ShowColumnHeaders := True;
    dimensionTreeNet1.CtrlBox.AdjustWidthOnlyVisible := True;
    dimensionTreeNet1.CtrlBox.HighlightTrack := False;
    dimensionTreeNet1.CtrlBox.ShowHeaderButton := True;
    dimensionTreeNet1.CtrlBox.AdjustWidth(0);
    dimensionTreeNet1.CtrlBox.UseSystemImages := True;
End Sub;

See also:

IDimensionViewer