How to start?

The following screen shot, shows a general idea how parts and objects of the control are arranged:  

Parts of Exontrol's eXGantt Component

click to enlarge

The following steps shows you progressively how to start programming the Exontrol's ExGantt component:

  • LoadXML / SaveXML methods, to load / save data using XML format.
  • DataSource property, to load / update / save data from a table, query, dataset and so on.
  • GetItems / PutItems methods, to load / save data from a/to safe array of data.
For instance, 
With Gantt1
	.LoadXML "http://www.exontrol.net/testing.xml"
End With
loads control's data from specified URL.
  • UnitScale property, determines the base time-unit scale to be displayed on the chart.
  • Label property, indicates the predefined format of the level's label for a specified unit, to be shown on the chart.
  • LevelCount property, specifies the number of levels to be shown on the chart's header.
For instance, 
With Gantt1
	With .Chart
		.LevelCount = 2
		.UnitScale = exDay
	End With
End With
specifies that the chart's header should display two levels, and the base time-unit scale to be day.
  • Add method, adds a new type of bar, including a combination of any of already predefined bars to display split or/and progress bars.
  • Copy property, clones an already predefined bar.
For instance, 
With Gantt1
	.Chart.Bars.Add("Task%Progress").Shortcut = "TProgress"
End With
defines a new task bar to display a progress bar inside. See Item-Bars, to see how you can add tasks/bars to the control's chart panel.
  • Add method, adds a new column.
  • ExpandColumns property specifies the columns to be shown/hidden when the column is expanded or collapsed.
For instance, 
With Gantt1
	With .Columns.Add("Check")
		.Position = 0
		.Def(exCellHasCheckBox) = True
	End With
End With
adds a new column that displays check-boxes, and that's the first visible column.
For instance, 
With Gantt1
	With .Items
		.AddItem "new item"
	End With
End With
adds a new item.
For instance, 
With Gantt1
	With .Items
		h = .InsertItem(.FocusItem,"","item 1.1")
		.CellCaption(h,1) = "item 1.2"
		.CellCaption(h,2) = "item 1.3"
		.ExpandItem(.FocusItem) = True
	End With
End With
adds a new child item of the focused item, and fills the cell's caption for the second and third column.
  • AddBar method, adds a new bar of specified type, giving its time interval.
  • ItemBar property, updates properties of specified bar, like caption, effort, and so on
For instance, 
With Gantt1
	With .Items
		.AddBar .FocusItem,"Task",#4/1/2006#,#4/14/2006#,"new"
	End With
End With
adds a new task to the focus item, with the key "new".
  • AddLink method, links two bars.
  • Link property, gets access to the link's properties
For instance, 
With Gantt1
	With .Items
		.AddBar .FocusItem,"Task",#4/1/2006#,#4/14/2006#,"A"
		.AddBar .FocusItem,"Task",#4/18/2006#,#4/30/2006#,"B"
		.AddLink "AB",.FocusItem,"A",.FocusItem,"B"
	End With
End With
adds two linked bars A and B in the same item.
Send comments on this topic.
1999-2016 Exontrol. All rights reserved.