property G2antt.OnResizeControl as OnResizeControlEnum
Specifies whether the list or the chart part is resized once the control is resized.

 TypeDescription 
   OnResizeControlEnum An OnResizeControlEnum expression that specifies whether the list or the chart part of the control is resized, when the entire control is resized.  
By default, the OnResizeControl property is exResizeList. In other words, the list part of the control ( the part that lists the columns ) gets resized, and the chart are stay fixed. Use the OnResizeControl to specify whether the chart area should be resized when the user resizes the control ( whenever the chart is anchored to a form ). Use the PaneWidth property to specify the width of the list or chart part of the control. The HistogramBoundsChanged event notifies your application when the location and the size of the chart's histogram is changed, so you can use it to add your legend for the histogram in a panel component. The controls vertical splitter is hidden if the OnControlResize property is exResizeChart + exDisableSplitter (129 ) and the PaneWidth(False) property is 0.

Use the OnResizeControl property to allow:

You can also use the OnResizeControl property to prevent:

The following VB sample shows how can I disable the control's splitter so the user can't resize the chart area:

With G2antt1
	.OnResizeControl = exDisableSplitter
	.Chart.PaneWidth(1) = 60
End With
The following VB.NET sample shows how can I disable the control's splitter so the user can't resize the chart area:
With AxG2antt1
	.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter
	.Chart.PaneWidth(1) = 60
End With
The following C++ sample shows how can I disable the control's splitter so the user can't resize the chart area:
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'

	#import <ExG2antt.dll>
	using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exDisableSplitter);
spG2antt1->GetChart()->PutPaneWidth(1,60);
The following C# sample shows how can I disable the control's splitter so the user can't resize the chart area:
axG2antt1.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter;
axG2antt1.Chart.set_PaneWidth(1 != 0,60);
The following VFP sample shows how can I disable the control's splitter so the user can't resize the chart area:
with thisform.G2antt1
	.OnResizeControl = 128
	.Chart.PaneWidth(1) = 60
endwith


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.