property InsideZoom.AllowInsideFormat as Boolean
Specifies whether the unit allows displaying the inside format.

 TypeDescription 
   Boolean A boolean expression that specifies whether the inside unit displays the new time scale unit, and so the InsideLabel property.   
By default, the AllowInsideFormat property is True. If the AllowInsideFormat property is True, the level displays the new units base on the properties as InsideLabel, InsideUnit and InsideCount. If the AllowInsideFormat property is False, the unit does not display the new time scale unit, instead it displays the label as indicated by OwnerLabel property. In other words, you can use the AllowInsideFormat property on True, when you need to display a new time scale unit, or on False, when actually you need to change the visual appearance for specified unit. Use the SplitBaseLevel property to specify whether the base level is divided in two lines, so the first displays the owner label, and the second line displays the inside format. If the AllowInsideFormat property is False, the grid lines, the inside label, and the tick lines are not shown.

The following screen shot shows the inside zoom unit with AllowInsideFormat property on True:

The following screen shot shows the inside zoom unit with AllowInsideFormat property on False:

The following VB sample shows how can I change the foreground color for a time unit:
With G2antt1
	.BeginUpdate 
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2008#
		.AllowInsideZoom = True
		.AllowResizeInsideZoom = False
		.InsideZoomOnDblClick = False
		.DefaultInsideZoomFormat.ForeColor = 255
		With .InsideZooms
			.SplitBaseLevel = False
			.DefaultWidth = 18
			.Add(#1/4/2008#).AllowInsideFormat = False
		End With
	End With
	.EndUpdate 
End With
The following VB.NET sample shows how can I change the foreground color for a time unit:
With AxG2antt1
	.BeginUpdate 
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2008#
		.AllowInsideZoom = True
		.AllowResizeInsideZoom = False
		.InsideZoomOnDblClick = False
		.DefaultInsideZoomFormat.ForeColor = 255
		With .InsideZooms
			.SplitBaseLevel = False
			.DefaultWidth = 18
			.Add(#1/4/2008#).AllowInsideFormat = False
		End With
	End With
	.EndUpdate 
End With
The following C++ sample shows how can I change the foreground color for a time unit:
/*
	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->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
	var_Chart->PutLevelCount(2);
	var_Chart->PutFirstVisibleDate("1/1/2008");
	var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
	var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
	var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
	var_Chart->GetDefaultInsideZoomFormat()->PutForeColor(255);
	EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
		var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
		var_InsideZooms->PutDefaultWidth(18);
		var_InsideZooms->Add("1/4/2008")->PutAllowInsideFormat(VARIANT_FALSE);
spG2antt1->EndUpdate();
The following C# sample shows how can I change the foreground color for a time unit:
axG2antt1.BeginUpdate();
EXG2ANTTLib.Chart var_Chart = axG2antt1.Chart;
	var_Chart.LevelCount = 2;
	var_Chart.FirstVisibleDate = "1/1/2008";
	var_Chart.AllowInsideZoom = true;
	var_Chart.AllowResizeInsideZoom = false;
	var_Chart.InsideZoomOnDblClick = false;
	var_Chart.DefaultInsideZoomFormat.ForeColor = 255;
	EXG2ANTTLib.InsideZooms var_InsideZooms = var_Chart.InsideZooms;
		var_InsideZooms.SplitBaseLevel = false;
		var_InsideZooms.DefaultWidth = 18;
		var_InsideZooms.Add("1/4/2008").AllowInsideFormat = false;
axG2antt1.EndUpdate();
The following VFP sample shows how can I change the foreground color for a time unit:
with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.LevelCount = 2
		.FirstVisibleDate = {^2008-1-1}
		.AllowInsideZoom = .T.
		.AllowResizeInsideZoom = .F.
		.InsideZoomOnDblClick = .F.
		.DefaultInsideZoomFormat.ForeColor = 255
		with .InsideZooms
			.SplitBaseLevel = .F.
			.DefaultWidth = 18
			.Add({^2008-1-4}).AllowInsideFormat = .F.
		endwith
	endwith
	.EndUpdate
endwith

 


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