EBN-Skinning | ||||||||||||||||||||||||
Most of our UI component supports skinning, or in other words you can define how parts of the component may looks like. In this tutorial we will apply skins to bars in the eXG2antt component. The tutorial provides code for Access, VB6, Visual FoxPro, VB.NET, C#, C++,Visual DataFlex. If the NET Assembly is listed in the programming language name it means that the section is applied to NET Assembly Version of the component, else the COM or ActiveX version is being used. Generally speaking, if any of our components provides the VisualAppearance property it means that the visual appearance for almost all visible parts of the component can be changed using EBN objects. The Exontrol's eXButton/COM installs a WYSWYG Builder ( Builder.exe ) that helps creating and editing EBN files ( skin files ). The following tutorial shows:
Also, you can view the following items:
With G2antt1 .BeginUpdate .VisualAppearance.Add 1, "C:\Temp\rect.ebn" With .Chart.Bars("Task") .Color = &H1000000 End With .EndUpdate End With
With G2antt1 .BeginUpdate .VisualAppearance.Add 1, "C:\Temp\rect.ebn" With .Chart.Bars("Task") .Color = &H1000000 End With .EndUpdate End With
With thisform.G2antt1 .BeginUpdate .VisualAppearance.Add(1, "C:\Temp\rect.ebn") With .Chart.Bars("Task") .Color = 0x1000000 EndWith .EndUpdate EndWith
With AxG2antt1 .BeginUpdate() .VisualAppearance.Add(1, "C:\Temp\rect.ebn") With .Chart.Bars("Task") .Color = &H1000000 End With .EndUpdate() End With
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1, "C:\Temp\rect.ebn") With .Chart.Bars("Task") .Color32 = &H1000000 End With .EndUpdate() End With
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1, "C:\\Temp\\rect.ebn"); axG2antt1.Chart.Bars["Task"].Color = 0x1000000; axG2antt1.EndUpdate();
exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance.Add(1, "C:\\Temp\\rect.ebn"); exg2antt1.Chart.Bars["Task"].Color32 = 0x1000000; exg2antt1.EndUpdate();
m_g2antt.BeginUpdate(); m_g2antt.GetVisualAppearance().Add(1, COleVariant("C:\\Temp\\rect.ebn") ); m_g2antt.GetChart().GetBars().GetItem( COleVariant("Task" ) ).SetColor( 0x1000000 ); m_g2antt.EndUpdate();
m_g2antt.BeginUpdate(); EXG2ANTTLib::IAppearancePtr spAppearance = m_g2antt.get_VisualAppearance(); spAppearance->Add(1, "C:\\Temp\\rect.ebn" ); EXG2ANTTLib::IChartPtr spChart = m_g2antt.get_Chart(); spChart->Bars->GetItem("Task")->Color =0x1000000; m_g2antt.EndUpdate();
Procedure changeAppearance Handle g Variant voAppearance Get ComVisualAppearance of g to voAppearance Handle hoAppearance Get Create (RefClass(cComAppearance)) to hoAppearance Set pvComObject of hoAppearance to voAppearance Get ComAdd of hoAppearance 1 "C:/Temp/rect.ebn" to Nothing Send Destroy to hoAppearance Variant vChart Get ComChart of g to vChart Handle hoChart Get Create (RefClass(cComChart)) to hoChart Set pvComObject of hoChart to vChart Variant vBars Get ComBars of hoChart to vBars Handle hoBars Get Create (RefClass(cComBars)) to hoBars Set pvComObject of hoBars to vBars Variant vBar Get ComItem of hoBars "Task" to vBar Handle hoBar Get Create (RefClass(cComBar)) to hoBar Set pvComObject of hoBar to vBar Set ComColor of hoBar to |CI$1000000 Send Destroy to hoBar Send Destroy to hoBars Send Destroy to hoChart End_Procedure Let's change now the height of the Task bars, so you need to call the Height property as shown in the following sample:
With G2antt1 .BeginUpdate .VisualAppearance.Add 1, "C:\Temp\rect.ebn" With .Chart.Bars("Task") .Color = &H1000000 .Height = 22 End With .EndUpdate End With
With G2antt1 .BeginUpdate .VisualAppearance.Add 1, "C:\Temp\rect.ebn" With .Chart.Bars("Task") .Color = &H1000000 .Height = 22 End With .EndUpdate End With
With thisform.G2antt1 .BeginUpdate .VisualAppearance.Add(1, "C:\Temp\rect.ebn") With .Chart.Bars("Task") .Color = 0x1000000 .Height = 22 EndWith .EndUpdate EndWith
With AxG2antt1 .BeginUpdate() .VisualAppearance.Add(1, "C:\Temp\rect.ebn") With .Chart.Bars("Task") .Color = &H1000000 .Height = 22 End With .EndUpdate() End With
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1, "C:\Temp\rect.ebn") With .Chart.Bars("Task") .Color32 = &H1000000 .Height = 22 End With .EndUpdate() End With
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1, "C:\\Temp\\rect.ebn"); EXG2ANTTLib.Bar t = axG2antt1.Chart.Bars["Task"]; t.Color = 0x1000000; t.Height = 22; axG2antt1.EndUpdate();
exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance.Add(1, "C:\\Temp\\rect.ebn"); exontrol.EXG2ANTTLib.Bar t = exg2antt1.Chart.Bars["Task"]; t.Color32 = 0x1000000; t.Height = 22; exg2antt1.EndUpdate();
m_g2antt.BeginUpdate(); m_g2antt.GetVisualAppearance().Add(1, COleVariant("C:\\Temp\\rect.ebn") ); CBar t = m_g2antt.GetChart().GetBars().GetItem( COleVariant("Task" ) ); t.SetColor( 0x1000000 ); t.SetHeight( 22 ); m_g2antt.EndUpdate();
m_g2antt.BeginUpdate(); EXG2ANTTLib::IAppearancePtr spAppearance = m_g2antt.get_VisualAppearance(); spAppearance->Add(1, "C:\\Temp\\rect.ebn" ); EXG2ANTTLib::IChartPtr spChart = m_g2antt.get_Chart(); EXG2ANTTLib::IBarPtr t = spChart->Bars->GetItem("Task"); t->Color =0x1000000; t->Height = 22; m_g2antt.EndUpdate();
Procedure changeAppearance Handle g Variant voAppearance Get ComVisualAppearance of g to voAppearance Handle hoAppearance Get Create (RefClass(cComAppearance)) to hoAppearance Set pvComObject of hoAppearance to voAppearance Get ComAdd of hoAppearance 1 "C:/Temp/rect.ebn" to Nothing Send Destroy to hoAppearance Variant vChart Get ComChart of g to vChart Handle hoChart Get Create (RefClass(cComChart)) to hoChart Set pvComObject of hoChart to vChart Variant vBars Get ComBars of hoChart to vBars Handle hoBars Get Create (RefClass(cComBars)) to hoBars Set pvComObject of hoBars to vBars Variant vBar Get ComItem of hoBars "Task" to vBar Handle hoBar Get Create (RefClass(cComBar)) to hoBar Set pvComObject of hoBar to vBar Set ComColor of hoBar to |CI$1000000 Set ComHeight of hoBar to 22 Send Destroy to hoBar Send Destroy to hoBars Send Destroy to hoChart End_Procedure
With G2antt1 .BeginUpdate .VisualAppearance.Add 1, "C:\Temp\arrow.ebn" With .Chart.Bars("Task") .Color = &H1000000 .Height = 24 End With .EndUpdate End With
With G2antt1 .BeginUpdate .VisualAppearance.Add 1, "C:\Temp\arrow.ebn" With .Chart.Bars("Task") .Color = &H1000000 .Height = 24 End With .EndUpdate End With
With thisform.G2antt1 .BeginUpdate .VisualAppearance.Add(1, "C:\Temp\arrow.ebn") With .Chart.Bars("Task") .Color = 0x1000000 .Height = 24 EndWith .EndUpdate EndWith
With AxG2antt1 .BeginUpdate() .VisualAppearance.Add(1, "C:\Temp\arrow.ebn") With .Chart.Bars("Task") .Color = &H1000000 .Height = 24 End With .EndUpdate() End With
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1, "C:\Temp\arrow.ebn") With .Chart.Bars("Task") .Color32 = &H1000000 .Height = 24 End With .EndUpdate() End With
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1, "C:\\Temp\\arrow.ebn"); EXG2ANTTLib.Bar t = axG2antt1.Chart.Bars["Task"]; t.Color = 0x1000000; t.Height = 24; axG2antt1.EndUpdate();
exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance.Add(1, "C:\\Temp\\arrow.ebn"); exontrol.EXG2ANTTLib.Bar t = exg2antt1.Chart.Bars["Task"]; t.Color32 = 0x1000000; t.Height = 24; exg2antt1.EndUpdate();
m_g2antt.BeginUpdate(); m_g2antt.GetVisualAppearance().Add(1, COleVariant("C:\\Temp\\arrow.ebn") ); CBar t = m_g2antt.GetChart().GetBars().GetItem( COleVariant("Task" ) ); t.SetColor( 0x1000000 ); t.SetHeight( 24 ); m_g2antt.EndUpdate();
m_g2antt.BeginUpdate(); EXG2ANTTLib::IAppearancePtr spAppearance = m_g2antt.get_VisualAppearance(); spAppearance->Add(1, "C:\\Temp\\arrow.ebn" ); EXG2ANTTLib::IChartPtr spChart = m_g2antt.get_Chart(); EXG2ANTTLib::IBarPtr t = spChart->Bars->GetItem("Task"); t->Color =0x1000000; t->Height = 24; m_g2antt.EndUpdate();
Procedure changeAppearance Handle g Variant voAppearance Get ComVisualAppearance of g to voAppearance Handle hoAppearance Get Create (RefClass(cComAppearance)) to hoAppearance Set pvComObject of hoAppearance to voAppearance Get ComAdd of hoAppearance 1 "C:/Temp/arrow.ebn" to Nothing Send Destroy to hoAppearance Variant vChart Get ComChart of g to vChart Handle hoChart Get Create (RefClass(cComChart)) to hoChart Set pvComObject of hoChart to vChart Variant vBars Get ComBars of hoChart to vBars Handle hoBars Get Create (RefClass(cComBars)) to hoBars Set pvComObject of hoBars to vBars Variant vBar Get ComItem of hoBars "Task" to vBar Handle hoBar Get Create (RefClass(cComBar)) to hoBar Set pvComObject of hoBar to vBar Set ComColor of hoBar to |CI$1000000 Set ComHeight of hoBar to 24 Send Destroy to hoBar Send Destroy to hoBars Send Destroy to hoChart End_Procedure
With G2antt1 .BeginUpdate .VisualAppearance.Add 2, "c:\temp\arrow.ebn" .VisualAppearance.Add 1, "CP:2 -6 0 6 0" With .Chart.Bars("Task") .Color = &H1000000 .Height = 24 End With .EndUpdate End With
With G2antt1 .BeginUpdate .VisualAppearance.Add 2, "c:\temp\arrow.ebn" .VisualAppearance.Add 1, "CP:2 -6 0 6 0" With .Chart.Bars("Task") .Color = &H1000000 .Height = 24 End With .EndUpdate End With
With thisform.G2antt1 .BeginUpdate .VisualAppearance.Add(2,"c:\temp\arrow.ebn") .VisualAppearance.Add(1, "CP:2 -6 0 6 0") With .Chart.Bars("Task") .Color = 0x1000000 .Height = 24 EndWith .EndUpdate EndWith
With AxG2antt1 .BeginUpdate() .VisualAppearance.Add(2, "c:\temp\arrow.ebn") .VisualAppearance.Add(1, "CP:2 -6 0 6 0") With .Chart.Bars("Task") .Color = &H1000000 .Height = 24 End With .EndUpdate() End With
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(2, "c:\temp\arrow.ebn") .VisualAppearance.Add(1, "CP:2 -6 0 6 0") With .Chart.Bars("Task") .Color32 = &H1000000 .Height = 24 End With .EndUpdate() End With
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(2, "C:\\Temp\\arrow.ebn"); axG2antt1.VisualAppearance.Add(1, "CP:2 -6 0 6 0"); EXG2ANTTLib.Bar t = axG2antt1.Chart.Bars["Task"]; t.Color = 0x1000000; t.Height = 24; axG2antt1.EndUpdate();
exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance.Add(2, "C:\\Temp\\arrow.ebn"); exg2antt1.VisualAppearance.Add(1, "CP:2 -6 0 6 0"); exontrol.EXG2ANTTLib.Bar t = exg2antt1.Chart.Bars["Task"]; t.Color32 = 0x1000000; t.Height = 24; exg2antt1.EndUpdate();
m_g2antt.BeginUpdate(); m_g2antt.GetVisualAppearance().Add(2, COleVariant("C:\\Temp\\arrow.ebn") ); m_g2antt.GetVisualAppearance().Add(1, COleVariant("CP:2 -6 0 6 0") ); CBar t = m_g2antt.GetChart().GetBars().GetItem( COleVariant("Task" ) ); t.SetColor( 0x1000000 ); t.SetHeight( 24 ); m_g2antt.EndUpdate();
m_g2antt.BeginUpdate(); EXG2ANTTLib::IAppearancePtr spAppearance = m_g2antt.get_VisualAppearance(); spAppearance->Add(2, "C:\\Temp\\arrow.ebn" ); spAppearance->Add(1, "CP:2 -6 0 6 0" ); EXG2ANTTLib::IChartPtr spChart = m_g2antt.get_Chart(); EXG2ANTTLib::IBarPtr t = spChart->Bars->GetItem("Task"); t->Color =0x1000000; t->Height = 24; m_g2antt.EndUpdate();
Procedure changeAppearance Handle g Variant voAppearance Get ComVisualAppearance of g to voAppearance Handle hoAppearance Get Create (RefClass(cComAppearance)) to hoAppearance Set pvComObject of hoAppearance to voAppearance Get ComAdd of hoAppearance 2 "C:/Temp/arrow.ebn" to Nothing Get ComAdd of hoAppearance 1 "CP:2 -6 0 6 0" to Nothing Send Destroy to hoAppearance Variant vChart Get ComChart of g to vChart Handle hoChart Get Create (RefClass(cComChart)) to hoChart Set pvComObject of hoChart to vChart Variant vBars Get ComBars of hoChart to vBars Handle hoBars Get Create (RefClass(cComBars)) to hoBars Set pvComObject of hoBars to vBars Variant vBar Get ComItem of hoBars "Task" to vBar Handle hoBar Get Create (RefClass(cComBar)) to hoBar Set pvComObject of hoBar to vBar Set ComColor of hoBar to |CI$1000000 Set ComHeight of hoBar to 24 Send Destroy to hoBar Send Destroy to hoBars Send Destroy to hoChart End_Procedure
With G2antt1 .BeginUpdate .Chart.ShowTransparentBars = 30 .VisualAppearance.Add 2, "c:\temp\arrow.ebn" .VisualAppearance.Add 1, "CP:2 -6 0 6 0" With .Chart.Bars("Task") .Color = &H1000000 .Height = 24 End With .EndUpdate End With
With G2antt1 .BeginUpdate .Chart.ShowTransparentBars = 30 .VisualAppearance.Add 2, "c:\temp\arrow.ebn" .VisualAppearance.Add 1, "CP:2 -6 0 6 0" With .Chart.Bars("Task") .Color = &H1000000 .Height = 24 End With .EndUpdate End With
With thisform.G2antt1 .BeginUpdate .Chart.ShowTransparentBars = 30 .VisualAppearance.Add(2,"c:\temp\arrow.ebn") .VisualAppearance.Add(1, "CP:2 -6 0 6 0") With .Chart.Bars("Task") .Color = 0x1000000 .Height = 24 EndWith .EndUpdate EndWith
With AxG2antt1 .BeginUpdate() .Chart.ShowTransparentBars = 30 .VisualAppearance.Add(2, "c:\temp\arrow.ebn") .VisualAppearance.Add(1, "CP:2 -6 0 6 0") With .Chart.Bars("Task") .Color = &H1000000 .Height = 24 End With .EndUpdate() End With
With Exg2antt1 .BeginUpdate() .Chart.ShowTransparentBars = 30 .VisualAppearance.Add(2, "c:\temp\arrow.ebn") .VisualAppearance.Add(1, "CP:2 -6 0 6 0") With .Chart.Bars("Task") .Color32 = &H1000000 .Height = 24 End With .EndUpdate() End With
axG2antt1.BeginUpdate(); axG2antt1.Chart.ShowTransparentBars = 30; axG2antt1.VisualAppearance.Add(2, "C:\\Temp\\arrow.ebn"); axG2antt1.VisualAppearance.Add(1, "CP:2 -6 0 6 0"); EXG2ANTTLib.Bar t = axG2antt1.Chart.Bars["Task"]; t.Color = 0x1000000; t.Height = 24; axG2antt1.EndUpdate();
exg2antt1.BeginUpdate(); exg2antt1.Chart.ShowTransparentBars = 30; exg2antt1.VisualAppearance.Add(2, "C:\\Temp\\arrow.ebn"); exg2antt1.VisualAppearance.Add(1, "CP:2 -6 0 6 0"); exontrol.EXG2ANTTLib.Bar t = exg2antt1.Chart.Bars["Task"]; t.Color32 = 0x1000000; t.Height = 24; exg2antt1.EndUpdate();
m_g2antt.BeginUpdate(); m_g2antt.GetChart().SetShowTransparentBars( 30 ); m_g2antt.GetVisualAppearance().Add(2, COleVariant("C:\\Temp\\arrow.ebn") ); m_g2antt.GetVisualAppearance().Add(1, COleVariant("CP:2 -6 0 6 0") ); CBar t = m_g2antt.GetChart().GetBars().GetItem( COleVariant("Task" ) ); t.SetColor( 0x1000000 ); t.SetHeight( 24 ); m_g2antt.EndUpdate();
m_g2antt.BeginUpdate(); EXG2ANTTLib::IChartPtr spChart = m_g2antt.get_Chart(); spChart->ShowTransparentBars = 30; EXG2ANTTLib::IAppearancePtr spAppearance = m_g2antt.get_VisualAppearance(); spAppearance->Add(2, "C:\\Temp\\arrow.ebn" ); spAppearance->Add(1, "CP:2 -6 0 6 0" ); EXG2ANTTLib::IBarPtr t = spChart->Bars->GetItem("Task"); t->Color =0x1000000; t->Height = 24; m_g2antt.EndUpdate();
Procedure changeAppearance Handle g Variant voAppearance Get ComVisualAppearance of g to voAppearance Handle hoAppearance Get Create (RefClass(cComAppearance)) to hoAppearance Set pvComObject of hoAppearance to voAppearance Get ComAdd of hoAppearance 2 "C:/Temp/arrow.ebn" to Nothing Get ComAdd of hoAppearance 1 "CP:2 -6 0 6 0" to Nothing Send Destroy to hoAppearance Variant vChart Get ComChart of g to vChart Handle hoChart Get Create (RefClass(cComChart)) to hoChart Set pvComObject of hoChart to vChart Set ComShowTransparentBars of hoChart to 30 Variant vBars Get ComBars of hoChart to vBars Handle hoBars Get Create (RefClass(cComBars)) to hoBars Set pvComObject of hoBars to vBars Variant vBar Get ComItem of hoBars "Task" to vBar Handle hoBar Get Create (RefClass(cComBar)) to hoBar Set pvComObject of hoBar to vBar Set ComColor of hoBar to |CI$1000000 Set ComHeight of hoBar to 24 Send Destroy to hoBar Send Destroy to hoBars Send Destroy to hoChart End_Procedure
BeginUpdate BackColor = RGB(255,255,255) MarkSearchColumn = False ShowFocusRect = False HasLines = False Indent = 24 DefaultItemHeight = 32 Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1BAmBhOCwMKwuDw2ExWJxmIx2HyGLx+SyONyuTy2UzWZzmYz2X0Gbx1kUigUAAMwzGeo1Ws1ZV2Go1IAL+1ACZMxm2+52W63Ov2Op1fC13F0un4nJ1vE2BV2XD2e/4vK4fL63V1bMTKZ5/d2pf3vh6Xj2ff3e63G683S5vF0mmAD4+Xx+bA+wAeP5/H6a/9+h8P2eIAGZAiHHYZkDQQ7TuH/Ap4GUUzjPgiCJn+AD7GBAMNQJBD8wFDwAFlEUExJBaHQdCDixM+UARYABuxg/8ZQ5DUQRpEEbQKf8DxPBDiPe08KRdDEZHVIwANU1YRSWAALSdJsnxpHcFO3HsrOI48Ky1IkKQpERZAA9sjHVC77ynEsqwbBE1RVNKHgAQ04yQ1skvDOJDRkZc9ABJYRT5Jk+z/P0pR49sgQHAsaUVApx0aAD+mvOclSZIkYG7MsMxNTUqyw+FFwVRNQwRSwACFUwADvVNHv9IlNu5V02u5UjzVMIUQxHMYABzXdUVVRpxgBXM60DX9MQHTjWrJE0uzfGkXRdXNa0FYMjxBM8vxJM7iWXN8KSlbs31zWlT1Ja0eWxM9tNbbkLUhY1mQtaU62hI9hyZUl0x5H6x3ZLVvwtekyWlYlHXNBF0R5dTszdC1vR1cELVJO9JABLODVvMF8x9deGS1fE3yJXYc4pgOKUDfGE31ZN+Srd13U/VdI1y9uCWBPRl2NE1sWxbeWv9l2f6DSNSXdkTaNtd1WyrncR567mgaHGJLanMLY2laVc2FOjW1JpTuX2sV0YhmMtQpXLct1msZRBLmU421exYbN93XgAFixA9s61ztkzbc4u47LHmb6O8ExSPs0j6NOtyv1hSy8BCm6bHs7eUDXMXb5DOLuJyG5v9CjzWLCkszrqZLS2+/NtbwEQdFN9sPbLPEYFU/Fxj1TV2U7WyahslSdM8O9SPGkieK+8iW33fe1JXNUjvqrnWlo1A2lUnieO+/k1lGMs7RjDwvNiciedUtT6Nd3B+RlaxQJBmx8luULWLLPqxjZ769S/UQe1svPUi6M+D5DzN5a2athyHX9H6f43VIjE3yMTbqrlbB5l3OYgU+ssL7X+rtc+2Nj7AD5vwRkkSCyAoFvvg6/FaiZIIuHbGv9DRxEuQeRjC2FkKH/pvRcs4+b+4MFgH+mmISDIhrHN0dqI5uIjRLGYbOJp2YnRRihAaIsQYiRXIdFVKsSImRKiegOKUYIpxZiwg2MsWokxpjFGs7UY4vxvNmWSKwAEHoRjrHRFMZkToMd3HqOcf4lRBN1IKLMg4vGzjnHeRUeY+yNj5GeIkhpJSFkpF+RKKZFoRj9I6PcZJKSElBIGUUR44ljkBJCT0gI1RclZIeN0YZLRalRKqLsq5XRslhIiWUqY0S1l9HCV8YyyEWB8SuYpHiQEiJIAAkpKJmk4QoX8pJFE3zSKCQEA=") ScrollHeight = 13 ScrollWidth = 13 ScrollButtonWidth = 13 ScrollButtonHeight = 13 Columns { Add("Task Name").AutoSearch = 1 Add("Duration") { AllowSizing = False Width = 48 HeaderAlignment = 1 ComputedField = "%3-%2" } Add("Start").Visible = False Add("End").Visible = False } Chart { AllowCreateBar = False NonworkingDaysColor = RGB(196,196,128) NonworkingDaysPattern = 6 FirstVisibleDate = #2/24/2006# BackColor = RGB(255,255,255) DrawGridLines = 2 LevelCount = 2 Level(0) { Label = "<b><%mmmm%></b>" Unit = 16 DrawGridLines = True } Level(1) { Label = "<%ww%>" Unit = 256 } Bars("Task") { } } Items { Dim h,h1,h2,h3,h4 h4 = AddItem("Research into Interface technologies") ItemBold(h4) = True CellValue(h4,2) = #3/7/2006# CellValue(h4,3) = #6/27/2006# AddBar(h4,"Summary",CellValue(h4,2),CellValue(h4,3)) h1 = InsertItem(h4,,"Receive general ideas from other groups") CellValue(h1,2) = #3/7/2006# CellValue(h1,3) = #6/27/2006# AddBar(h1,"Task",CellValue(h1,2),CellValue(h1,3)) ItemBar(h1,"",513) = RGB(0,0,255) ExpandItem(h4) = True h = AddItem("Receive specs from other groups") ItemBold(h) = True CellValue(h,2) = #4/7/2006# CellValue(h,3) = #6/27/2006# AddBar(h,"Summary",CellValue(h,2),CellValue(h,3)) h1 = InsertItem(h,,"Analyse received specifications") CellValue(h1,2) = #4/7/2006# CellValue(h1,3) = #6/4/2006# AddBar(h1,"Task",CellValue(h1,2),CellValue(h1,3)) ItemBar(h1,"",3) = " <b><img>2</img><b><fgcolor=80FFFF>Day</fgcolor></b></b>" ItemBar(h1,"",4) = 0 AddBar(h1,"Task",CellValue(h1,2),CellValue(h1,3),1) ItemBar(h1,1,513) = 255 ItemBar(h1,1,515) = 58 ItemBar(h1,1,514) = 21 ItemBar(h1,1,3) = "Week <img>1</img>" h1 = InsertItem(h,,"Costing") CellValue(h1,2) = #4/15/2006# CellValue(h1,3) = #6/19/2006# AddBar(h1,"Task",CellValue(h1,2),CellValue(h1,3)) AddBar(h1,"Task",CellValue(h1,2),CellValue(h1,3),1) ItemBar(h1,1,513) = RGB(0,255,0) ItemBar(h1,1,515) = 7 ItemBar(h1,1,18) = 4 ItemBar(h1,1,3) = " <fgcolor=00FF00><b><img>2</img><img>3</img>Month</b></fgcolor>" ItemBar(h1,1,4) = 18 ExpandItem(h) = True } EndUpdate
With G2antt1 .BeginUpdate .VisualAppearance.Add 1, "c:\temp\xpsel.ebn" With .Chart.Bars("Task") .Color = &H10000FF .Height = 16 End With .EndUpdate End With
With G2antt1 .BeginUpdate .VisualAppearance.Add 1, "c:\temp\xpsel.ebn" With .Chart.Bars("Task") .Color = &H10000FF .Height = 16 End With .EndUpdate End With
With thisform.G2antt1 .BeginUpdate .VisualAppearance.Add(1, "c:\temp\xpsel.ebn") With .Chart.Bars("Task") .Color = 0x10000FF .Height = 16 EndWith .EndUpdate EndWith
With AxG2antt1 .BeginUpdate() .VisualAppearance.Add(1, "c:\temp\xpsel.ebn") With .Chart.Bars("Task") .Color = &H10000FF .Height = 16 End With .EndUpdate() End With
With Exg2antt1 .BeginUpdate() .VisualAppearance.Add(1, "c:\temp\xpsel.ebn") With .Chart.Bars("Task") .Color32 = &H10000FF .Height = 16 End With .EndUpdate() End With
axG2antt1.BeginUpdate(); axG2antt1.VisualAppearance.Add(1, "c:\\temp\\xpsel.ebn"); EXG2ANTTLib.Bar t = axG2antt1.Chart.Bars["Task"]; t.Color = 0x10000FF; t.Height = 16; axG2antt1.EndUpdate();
exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance.Add(1, "c:\\temp\\xpsel.ebn"); exontrol.EXG2ANTTLib.Bar t = exg2antt1.Chart.Bars["Task"]; t.Color32 = 0x10000FF; t.Height = 16; exg2antt1.EndUpdate();
m_g2antt.BeginUpdate(); m_g2antt.GetVisualAppearance().Add(1, COleVariant("C:\\Temp\\xpsel.ebn") ); CBar t = m_g2antt.GetChart().GetBars().GetItem( COleVariant("Task" ) ); t.SetColor( 0x10000FF ); t.SetHeight( 16 ); m_g2antt.EndUpdate();
m_g2antt.BeginUpdate(); EXG2ANTTLib::IAppearancePtr spAppearance = m_g2antt.get_VisualAppearance(); spAppearance->Add(1, "C:\\Temp\\xpsel.ebn" ); EXG2ANTTLib::IChartPtr spChart = m_g2antt.get_Chart(); EXG2ANTTLib::IBarPtr t = spChart->Bars->GetItem("Task"); t->Color =0x10000FF; t->Height = 16; m_g2antt.EndUpdate();
Procedure changeAppearance Handle g Variant voAppearance Get ComVisualAppearance of g to voAppearance Handle hoAppearance Get Create (RefClass(cComAppearance)) to hoAppearance Set pvComObject of hoAppearance to voAppearance Get ComAdd of hoAppearance 1 "C:/Temp/xpsel.ebn" to Nothing Send Destroy to hoAppearance Variant vChart Get ComChart of g to vChart Handle hoChart Get Create (RefClass(cComChart)) to hoChart Set pvComObject of hoChart to vChart Variant vBars Get ComBars of hoChart to vBars Handle hoBars Get Create (RefClass(cComBars)) to hoBars Set pvComObject of hoBars to vBars Variant vBar Get ComItem of hoBars "Task" to vBar Handle hoBar Get Create (RefClass(cComBar)) to hoBar Set pvComObject of hoBar to vBar Set ComColor of hoBar to |CI$10000FF Set ComHeight of hoBar to 16 Send Destroy to hoBar Send Destroy to hoBars Send Destroy to hoChart End_Procedure
when the Color has been &H1000000, so no FF has been used.
BeginUpdate() ScrollBySingleLine = True Columns.Add("Tasks") Chart { AllowCreateBar = 0 AllowLinkBars = False FirstVisibleDate = #6/21/2005# LevelCount = 2 Level(1) { Count = 8 Label = "<%hh%>" } Level(0).Label = "<%mm%>-<b><%dd%></b>-<%yy%>" ResizeUnitCount = 4 } Items { Dim h, h1,h2 h = AddItem("Project") ItemHeight(h) = 28 AddBar(h,"Summary",#6/22/2005#,#6/23/2005 16:00#,"","<br>< <b>Project Summary</b> >") h1 = InsertItem(h,,"Task 1") AddBar(h1,"Task",#6/21/2005 16:00#,#6/23/2005#,"","some <font Comic Sans MS;12><a>text</a></font> here") ItemBar(h1,"",4) = 18 DefineSummaryBars(h,"",h1,"") h2 = InsertItem(h,,"Task 2") AddBar(h2,"Task",#6/23/2005 8:00#,#6/25/2005#) DefineSummaryBars(h,"",h2,"") AddLink("Link1",h1,"",h2,"") Link("Link1",6) = 0 Link("Link1",12) = "<bgcolor=FFFFFF> Link <a>1</a> </bgcolor>" ExpandItem(h) = True } EndUpdate()
|
||||||||||||||||||||||||