2337 |
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 3)
PROCEDURE OnBarResizing(oG2antt,Item,Key) DevOut( "Start" ) DevOut( Transform(Key,"") ) DevOut( Transform(oG2antt:Items:ItemBar(Item,Key,547/*exBarStartStr*/),"") ) DevOut( "End" ) DevOut( Transform(Key,"") ) DevOut( Transform(oG2antt:Items:ItemBar(Item,Key,548/*exBarEndStr*/),"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Tasks") oG2antt:Debug := .T. oChart := oG2antt:Chart() oChart:FirstVisibleDate := "09/20/2006" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,96) oChart:ResizeUnitScale := 1048576/*exMinute*/ oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/24/2006","K1") oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006","K2") oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/23/2006","09/26/2006","K3") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2336 |
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 2)
PROCEDURE OnBarResizing(oG2antt,Item,Key) DevOut( "Start" ) DevOut( Transform(Key,"") ) DevOut( Transform(oG2antt:FormatABC("dateF(value)",oG2antt:Items:ItemBar(Item,Key,1/*exBarStart*/)),"") ) DevOut( "End" ) DevOut( Transform(Key,"") ) DevOut( Transform(oG2antt:FormatABC("dateF(value)",oG2antt:Items:ItemBar(Item,Key,2/*exBarEnd*/)),"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Tasks") oG2antt:Debug := .T. oChart := oG2antt:Chart() oChart:FirstVisibleDate := "09/20/2006" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,96) oChart:ResizeUnitScale := 1048576/*exMinute*/ oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/24/2006","K1") oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006","K2") oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/23/2006","09/26/2006","K3") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2335 |
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 1)
PROCEDURE OnBarResizing(oG2antt,Item,Key) DevOut( "Start" ) DevOut( Transform(Key,"") ) DevOut( Transform(oG2antt:FormatABC("date(value) format `MM/dd/yyyy HH:mm:ss`",oG2antt:Items:ItemBar(Item,Key,1/*exBarStart*/)),"") ) DevOut( "End" ) DevOut( Transform(Key,"") ) DevOut( Transform(oG2antt:FormatABC("date(value) format `MM/dd/yyyy HH:mm:ss`",oG2antt:Items:ItemBar(Item,Key,2/*exBarEnd*/)),"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Tasks") oG2antt:Debug := .T. oChart := oG2antt:Chart() oChart:FirstVisibleDate := "09/20/2006" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,96) oChart:ResizeUnitScale := 1048576/*exMinute*/ oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/24/2006","K1") oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006","K2") oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/23/2006","09/26/2006","K3") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2334 |
Add/Remove/Updates the item-bar's resources
PROCEDURE OnClick(oG2antt) LOCAL oItems LOCAL h oItems := oG2antt:Items() h := oItems:SelectedItem(0) oItems:SetProperty("ItemBar",h,oItems:FirstItemBar(h),49/*exBarResources*/,"+R4[10%]") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/ oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2001" oBar := oChart:Bars:Item("Task") oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18) oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%49%>") oG2antt:Columns():Add("Machines") oItems := oG2antt:Items() h := oItems:AddItem("Machine 1") oItems:AddBar(h,"Task","01/06/2001","01/12/2001","K1") oItems:SetProperty("ItemBar",h,"K1",49/*exBarResources*/,"R1,R2") h := oItems:AddItem("Machine 2") oItems:AddBar(h,"Task","01/04/2001","01/14/2001","K2") oItems:SetProperty("ItemBar",h,"K2",49/*exBarResources*/,"R2[75%],R3") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2333 |
Distributes resources to a bar
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2001" oBar := oChart:Bars:Item("Task") oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18) oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%49%>") oG2antt:Columns():Add("Machines") oItems := oG2antt:Items() h := oItems:AddItem("Machine 1") oItems:AddBar(h,"Task","01/06/2001","01/12/2001","K1") oItems:SetProperty("ItemBar",h,"K1",49/*exBarResources*/,"R1,R2") h := oItems:AddItem("Machine 2") oItems:AddBar(h,"Task","01/04/2001","01/14/2001","K2") oItems:SetProperty("ItemBar",h,"K2",49/*exBarResources*/,"R2[75%],R3") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2332 |
How can I display additional information about a time zone when the user clicks on it (expandable)
|
2331 |
How can I have a tooltip for a marked TimeZone
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip(oG2antt:Chart:TimeZoneFromPoint(-1,-1),"",,"+8") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,0) oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2009" oChart:MarkTimeZone("Top","01/01/2010","01/05/2010",16711680,"1;;<fgcolor=FFFFFF>Top;1") oChart:MarkTimeZone("Partial","01/08/2010","01/12/2010",16711680,"50;;<fgcolor=FFFFFF>Partial;1") oChart:MarkTimeZone("Default","01/15/2010","01/19/2010",16711680,";;<fgcolor=FFFFFF>Default;1") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2330 |
Can I set a filter that automatically adds a * before and after the word, so the user can just search for 'cat' and it becomes '*cat*' automatically
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oColumn := oG2antt:Columns():Add("Items") oColumn:DisplayFilterButton := .T. oColumn:DisplayFilterPattern := .T. oColumn:SetProperty("Def",21/*exFilterPatternTemplate*/,"*<%filter%>*") oColumn:FilterType := 3/*exPattern*/ oColumn:Filter := "1" oItems := oG2antt:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oG2antt:ApplyFilter() oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2329 |
The fine dotted lines in the control appear much thicker than the standard ones we've been using. How can we fix this
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:DrawGridLines := -1/*exAllLines*/ oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oChart := oG2antt:Chart() oChart:GridLineStyle := 512/*exGridLinesGeometric*/ oChart:DrawGridLines := -1/*exAllLines*/ oG2antt:ColumnAutoResize := .F. oG2antt:Columns():Add("Column 1") oG2antt:Columns():Add("Column 2") oG2antt:Columns():Add("Column 3") oG2antt:Columns():Add("Column 4") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2328 |
Load data as a tree using a parent-id relationship
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL rs oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ColumnAutoResize := .F. oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:DrawGridLines := 2/*exVLines*/ oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ rs := CreateObject("ADODB.Recordset") rs:Open("Select * FROM Employees WHERE 1=0","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2antt:DataSource := rs oG2antt:Columns:Item(0):Width := 128 rs := CreateObject("ADODB.Recordset") rs:Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2antt:PutItems(rs:GetRows(),";0;17") oG2antt:Items():SetProperty("ExpandItem",0,.T.) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2327 |
Is there a way to change the contents of the drop down editor based on a value in another column
PROCEDURE OnAddItem(oG2antt,Item) oG2antt:Items():SetProperty("CellEditorVisible",Item,0,1/*exEditorVisible*/) oG2antt:Items():SetProperty("CellEditorVisible",Item,1,1/*exEditorVisible*/) RETURN PROCEDURE OnEditOpen(oG2antt) LOCAL oEditor LOCAL oItems LOCAL c,v oItems := oG2antt:Items() v := oItems:CellValue(oItems:FocusItem(),0) c := oItems:CellCaption(oItems:FocusItem(),0) oEditor := oG2antt:Columns:Item(1):Editor() oEditor:ClearItems() oEditor:AddItem(v,Transform(c,"")) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn LOCAL oEditor LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/ oG2antt:EditOpen := {|| OnEditOpen(oG2antt)} /*Occurs when the edit operation starts.*/ oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oColumn := oG2antt:Columns():Add("DropDownList") oEditor := oColumn:Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First") oEditor:AddItem(2,"Second") oEditor:AddItem(3,"Third") oG2antt:DrawGridLines := -1/*exAllLines*/ oG2antt:Columns():Add("DropDownList-Related"):Editor():EditType := 3/*DropDownListType*/ oItems := oG2antt:Items() oItems:SetProperty("CellValue",oItems:AddItem(1),1,-1) oItems:SetProperty("CellValue",oItems:AddItem(2),1,-1) oItems:SetProperty("CellValue",oItems:AddItem(3),1,-1) oItems:SetProperty("LockedItemCount",2/*exBottom*/,1) h := oItems:LockedItem(2/*exBottom*/,0) oItems:SetProperty("ItemDivider",h,0) oItems:SetProperty("ItemDividerLineAlignment",h,2/*DividerTop*/) oItems:SetProperty("CellEditorVisible",h,0,0/*exEditorHidden*/) oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/) oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/) oItems:SetProperty("CellValue",h,0,"The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection on the first column.") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2326 |
Highlight the editable fields
PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue) oG2antt:Refresh() RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn,oColumn1,oColumn2 LOCAL oColumns LOCAL oConditionalFormat,oConditionalFormat1,oConditionalFormat2 LOCAL oConditionalFormats LOCAL oItems LOCAL g1,g2,h,r oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/ oG2antt:FreezeEvents(.T.) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oConditionalFormats := oG2antt:ConditionalFormats() oConditionalFormat := oConditionalFormats:Add("%CE1") oConditionalFormat:Bold := .T. oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 245,245,245 } ) , .F. )) oConditionalFormat:ApplyTo := 1/*0x1+*/ oConditionalFormat1 := oConditionalFormats:Add("%CE2") oConditionalFormat1:Bold := .T. oConditionalFormat1:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 245,245,245 } ) , .F. )) oConditionalFormat1:ApplyTo := 2/*0x2+*/ oConditionalFormat2 := oConditionalFormats:Add("%CE3") oConditionalFormat2:Bold := .T. oConditionalFormat2:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 245,245,245 } ) , .F. )) oConditionalFormat2:ApplyTo := 3/*0x3+*/ oColumns := oG2antt:Columns() oColumns:Add("Description") oColumn := oColumns:Add("Qty") oColumn:Editor():EditType := 4/*SpinType*/ oColumn:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%1)") oColumn1 := oColumns:Add("Price") oColumn1:SetProperty("Def",20/*exTotalColumn*/,"avg(current,rec,%2)") oColumn1:Editor():EditType := 4/*SpinType*/ oColumn2 := oColumns:Add("Amount") oColumn2:ComputedField := "%1 * %2" oColumn2:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%3)") oItems := oG2antt:Items() r := oItems:AddItem("Root") g1 := oItems:InsertItem(r,,"Group 1") h := oItems:InsertItem(g1,,"Item 1") oItems:SetProperty("CellValue",h,1,1) oItems:SetProperty("CellValue",h,2,10) h := oItems:InsertItem(g1,,"Item 2") oItems:SetProperty("CellValue",h,1,2) oItems:SetProperty("CellValue",h,2,11) g2 := oItems:InsertItem(r,,"Group 2") h := oItems:InsertItem(g2,,"Item 1") oItems:SetProperty("CellValue",h,1,3) oItems:SetProperty("CellValue",h,2,12) h := oItems:InsertItem(g2,,"Item 2") oItems:SetProperty("CellValue",h,1,4) oItems:SetProperty("CellValue",h,2,13) oItems:SetProperty("ExpandItem",0,.T.) oG2antt:EndUpdate() oG2antt:FreezeEvents(.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2325 |
Highlight the total fields
PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue) oG2antt:Refresh() RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn,oColumn1,oColumn2 LOCAL oColumns LOCAL oConditionalFormat,oConditionalFormat1,oConditionalFormat2 LOCAL oConditionalFormats LOCAL oItems LOCAL g1,g2,h,r oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/ oG2antt:FreezeEvents(.T.) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oConditionalFormats := oG2antt:ConditionalFormats() oConditionalFormat := oConditionalFormats:Add("%CT1") oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oConditionalFormat:ApplyTo := 1/*0x1+*/ oConditionalFormat1 := oConditionalFormats:Add("%CT2") oConditionalFormat1:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oConditionalFormat1:ApplyTo := 2/*0x2+*/ oConditionalFormat2 := oConditionalFormats:Add("%CT3") oConditionalFormat2:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oConditionalFormat2:ApplyTo := 3/*0x3+*/ oColumns := oG2antt:Columns() oColumns:Add("Description") oColumn := oColumns:Add("Qty") oColumn:Editor():EditType := 4/*SpinType*/ oColumn:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%1)") oColumn1 := oColumns:Add("Price") oColumn1:SetProperty("Def",20/*exTotalColumn*/,"avg(current,rec,%2)") oColumn1:Editor():EditType := 4/*SpinType*/ oColumn2 := oColumns:Add("Amount") oColumn2:ComputedField := "%1 * %2" oColumn2:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%3)") oItems := oG2antt:Items() r := oItems:AddItem("Root") g1 := oItems:InsertItem(r,,"Group 1") h := oItems:InsertItem(g1,,"Item 1") oItems:SetProperty("CellValue",h,1,1) oItems:SetProperty("CellValue",h,2,10) h := oItems:InsertItem(g1,,"Item 2") oItems:SetProperty("CellValue",h,1,2) oItems:SetProperty("CellValue",h,2,11) g2 := oItems:InsertItem(r,,"Group 2") h := oItems:InsertItem(g2,,"Item 1") oItems:SetProperty("CellValue",h,1,3) oItems:SetProperty("CellValue",h,2,12) h := oItems:InsertItem(g2,,"Item 2") oItems:SetProperty("CellValue",h,1,4) oItems:SetProperty("CellValue",h,2,13) oItems:SetProperty("ExpandItem",0,.T.) oG2antt:EndUpdate() oG2antt:FreezeEvents(.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2324 |
Highlight the leaf items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumns LOCAL oItems LOCAL h,hR oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ConditionalFormats():Add("%CC0=0"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oColumns := oG2antt:Columns() oColumns:Add("Item"):Width := 16 oColumns:Add("Desc") oItems := oG2antt:Items() hR := oItems:AddItem("Root") oItems:SetProperty("CellValue",hR,1,"The root directory /") oItems:SetProperty("ExpandItem",hR,.T.) h := oItems:InsertItem(hR,,"Home") oItems:SetProperty("CellValue",h,1,"The home directory with user directories Alice and Bob") oItems:InsertItem(h,,"Alice") oItems:InsertItem(h,,"Bob") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:InsertItem(hR,,"Etc") oItems:SetProperty("CellValue",h,1,"The etc directory with one configuration file") h := oItems:InsertItem(h,,"nginx.conf") oItems:SetProperty("CellValue",oItems:InsertItem(hR,,"Var"),1,"The var directory") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2323 |
Highlight the parent items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumns LOCAL oItems LOCAL h,hR oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ConditionalFormats():Add("%CC0"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oColumns := oG2antt:Columns() oColumns:Add("Item"):Width := 16 oColumns:Add("Desc") oItems := oG2antt:Items() hR := oItems:AddItem("Root") oItems:SetProperty("CellValue",hR,1,"The root directory /") oItems:SetProperty("ExpandItem",hR,.T.) h := oItems:InsertItem(hR,,"Home") oItems:SetProperty("CellValue",h,1,"The home directory with user directories Alice and Bob") oItems:InsertItem(h,,"Alice") oItems:InsertItem(h,,"Bob") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:InsertItem(hR,,"Etc") oItems:SetProperty("CellValue",h,1,"The etc directory with one configuration file") h := oItems:InsertItem(h,,"nginx.conf") oItems:SetProperty("CellValue",oItems:InsertItem(hR,,"Var"),1,"The var directory") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2322 |
Highlight the item being expanded or collapsed
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumns LOCAL oItems LOCAL h,hR oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ConditionalFormats():Add("%CX0"):Bold := .T. oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oColumns := oG2antt:Columns() oColumns:Add("Item"):Width := 16 oColumns:Add("Desc") oItems := oG2antt:Items() hR := oItems:AddItem("Root") oItems:SetProperty("CellValue",hR,1,"The root directory /") oItems:SetProperty("ExpandItem",hR,.T.) h := oItems:InsertItem(hR,,"Home") oItems:SetProperty("CellValue",h,1,"The home directory with user directories Alice and Bob") oItems:InsertItem(h,,"Alice") oItems:InsertItem(h,,"Bob") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:InsertItem(hR,,"Etc") oItems:SetProperty("CellValue",h,1,"The etc directory with one configuration file") h := oItems:InsertItem(h,,"nginx.conf") oItems:SetProperty("CellValue",oItems:InsertItem(hR,,"Var"),1,"The var directory") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2321 |
I am using exTotalColumn. Is there an option to exclude specific cells to display the total
PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue) oG2antt:Refresh() RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn,oColumn1,oColumn2 LOCAL oColumns LOCAL oItems LOCAL g1,g2,h,r oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/ oG2antt:FreezeEvents(.T.) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oColumns := oG2antt:Columns() oColumns:Add("Description") oColumn := oColumns:Add("Qty") oColumn:Editor():EditType := 4/*SpinType*/ oColumn:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%1)") oColumn1 := oColumns:Add("Price") oColumn1:SetProperty("Def",20/*exTotalColumn*/,"avg(current,rec,%2)") oColumn1:Editor():EditType := 4/*SpinType*/ oColumn2 := oColumns:Add("Amount") oColumn2:ComputedField := "%1 * %2" oColumn2:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%3)") oItems := oG2antt:Items() r := oItems:AddItem("Root") g1 := oItems:InsertItem(r,,"Group 1") oItems:SetProperty("FormatCell",g1,2,"`<average missing>`") oItems:SetProperty("CellEditorVisible",g1,2,0/*exEditorHidden*/) oItems:SetProperty("CellBold",g1,2,.T.) oItems:SetProperty("CellForeColor",g1,2,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) h := oItems:InsertItem(g1,,"Item 1") oItems:SetProperty("CellValue",h,1,1) oItems:SetProperty("CellValue",h,2,10) h := oItems:InsertItem(g1,,"Item 2") oItems:SetProperty("CellValue",h,1,2) oItems:SetProperty("CellValue",h,2,11) g2 := oItems:InsertItem(r,,"Group 2") h := oItems:InsertItem(g2,,"Item 1") oItems:SetProperty("CellValue",h,1,3) oItems:SetProperty("CellValue",h,2,12) h := oItems:InsertItem(g2,,"Item 2") oItems:SetProperty("CellValue",h,1,4) oItems:SetProperty("CellValue",h,2,13) oItems:SetProperty("ExpandItem",0,.T.) oG2antt:EndUpdate() oG2antt:FreezeEvents(.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2320 |
How can I add a total column
PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue) oG2antt:Refresh() RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn,oColumn1,oColumn2 LOCAL oColumns LOCAL oItems LOCAL g1,g2,h,r oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/ oG2antt:FreezeEvents(.T.) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oColumns := oG2antt:Columns() oColumns:Add("Description") oColumn := oColumns:Add("Qty") oColumn:Editor():EditType := 4/*SpinType*/ oColumn:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%1)") oColumn1 := oColumns:Add("Price") oColumn1:SetProperty("Def",20/*exTotalColumn*/,"avg(current,rec,%2)") oColumn1:Editor():EditType := 4/*SpinType*/ oColumn2 := oColumns:Add("Amount") oColumn2:ComputedField := "%1 * %2" oColumn2:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%3)") oItems := oG2antt:Items() r := oItems:AddItem("Root") g1 := oItems:InsertItem(r,,"Group 1") h := oItems:InsertItem(g1,,"Item 1") oItems:SetProperty("CellValue",h,1,1) oItems:SetProperty("CellValue",h,2,10) h := oItems:InsertItem(g1,,"Item 2") oItems:SetProperty("CellValue",h,1,2) oItems:SetProperty("CellValue",h,2,11) g2 := oItems:InsertItem(r,,"Group 2") h := oItems:InsertItem(g2,,"Item 1") oItems:SetProperty("CellValue",h,1,3) oItems:SetProperty("CellValue",h,2,12) h := oItems:InsertItem(g2,,"Item 2") oItems:SetProperty("CellValue",h,1,4) oItems:SetProperty("CellValue",h,2,13) oItems:SetProperty("ExpandItem",0,.T.) oG2antt:EndUpdate() oG2antt:FreezeEvents(.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2319 |
Is it possible when I move the horizontal scroll bar, that the whole chart scrolls live during move the horizontal scroll bar. Not it scrolls just when I release the left mouse, not during change the horizontal scroll position
|
2318 |
The exLinkStyle is not valid (the style of the link is still solid) if the link's width is greater than 1. What can be done
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2,h3 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Task") oChart := oG2antt:Chart() oChart:FirstVisibleDate := "01/01/2001" oChart:SetProperty("PaneWidth",.F.,128) oG2antt:AntiAliasing := .T. oItems := oG2antt:Items() h1 := oItems:AddItem("Task 1") oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1") h2 := oItems:AddItem("Task 2") oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2") oItems:AddLink("L1",h1,"K1",h2,"K2") oItems:SetProperty("Link","L1",9/*exLinkStyle*/,2) oItems:SetProperty("Link","L1",10/*exLinkWidth*/,2) h3 := oItems:AddItem("Task 4") oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3") oItems:AddLink("L2",h2,"K2",h3,"K3") oItems:SetProperty("Link","L2",9/*exLinkStyle*/,1) oItems:SetProperty("Link","L2",10/*exLinkWidth*/,2) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2317 |
How can I change the tooltip's margins (method 2)
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip(oG2antt:Chart:BarFromPoint(-1,-1)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:ToolTipMargin := "16,8" oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"...") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2316 |
Are there any properties to set text margins at tooltip, like Margins="5,5" (method 1). Margins is used to get some space between text and the tooltips border
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip(oG2antt:Chart:BarFromPoint(-1,-1)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:ToolTipMargin := "16,8" oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"...") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2315 |
exShowExtendedLinks
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:DefaultItemHeight := 24 oG2antt:HeaderHeight := 20 oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:AntiAliasing := .T. oG2antt:Columns():Add("Task") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,48) oChart:LevelCount := 2 oChart:UnitScale := 65536/*exHour*/ oChart:FirstVisibleDate := "01/10/2024" oLevel := oChart:Level(1) oLevel:DrawTickLines := 0/*exLevelNoLine*/ oLevel:DrawTickLinesFrom(0,1/*exLevelDotLine*/) oChart:AllowResizeChart := -1/*0xfffffef9+exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oChart:ShowLinks := 1/*exShowExtendedLinks*/ oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("T1"),"Task","01/10/2024 10:00:00","01/10/2024 10:20:00","T1") oItems:AddBar(oItems:AddItem("T2"),"Task","01/10/2024 09:00:00","01/10/2024 12:00:00","T2") oItems:AddBar(oItems:AddItem("T3"),"Task","01/10/2024 08:00:00","01/10/2024 08:30:00","T3") oItems:AddBar(oItems:AddItem("T4"),"Task","01/10/2024 08:00:00","01/10/2024 08:30:00","T4") oItems:AddLink("L13",oItems:ItemByIndex(0),"T1",oItems:ItemByIndex(2),"T3") oItems:AddLink("L14",oItems:ItemByIndex(0),"T1",oItems:ItemByIndex(3),"T4") oItems:AddLink("L24",oItems:ItemByIndex(1),"T2",oItems:ItemByIndex(3),"T4") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2314 |
According to the documentation of the ShowExtendedLinksEnum value exShowExtendedLinks (1) it is possible to distinctly visualise links (rather than showing them one over another) when two or more links start or end on the same bar
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:DefaultItemHeight := 24 oG2antt:HeaderHeight := 20 oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:AntiAliasing := .T. oG2antt:Columns():Add("Task") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,48) oChart:LevelCount := 2 oChart:UnitScale := 65536/*exHour*/ oChart:FirstVisibleDate := "01/10/2024" oLevel := oChart:Level(1) oLevel:DrawTickLines := 0/*exLevelNoLine*/ oLevel:DrawTickLinesFrom(0,1/*exLevelDotLine*/) oChart:AllowResizeChart := -1/*0xfffffef9+exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("T1"),"Task","01/10/2024 10:00:00","01/10/2024 10:20:00","T1") oItems:AddBar(oItems:AddItem("T2"),"Task","01/10/2024 09:00:00","01/10/2024 12:00:00","T2") oItems:AddBar(oItems:AddItem("T3"),"Task","01/10/2024 08:00:00","01/10/2024 08:30:00","T3") oItems:AddBar(oItems:AddItem("T4"),"Task","01/10/2024 08:00:00","01/10/2024 08:30:00","T4") oItems:AddLink("L1",oItems:ItemByIndex(0),"T1",oItems:ItemByIndex(2),"T3") oItems:AddLink("L2",oItems:ItemByIndex(1),"T2",oItems:ItemByIndex(3),"T4") oItems:SetProperty("Link","L2",15/*exLinkShowRound*/,4) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2313 |
How to use arrows key left/right to move the cursor left/right inside the text
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oEditor := oG2antt:Columns():Add("Edit"):Editor() oEditor:EditType := 1/*EditType*/ oEditor:SetProperty("Option",20/*exLeftArrow*/,.F.) oEditor:SetProperty("Option",21/*exRightArrow*/,.F.) oItems := oG2antt:Items() oItems:AddItem("000") oItems:AddItem("111") oItems:AddItem("222") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2312 |
How can I force the cursor to jump to the end of the editor once the user clicks the cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:SetProperty("SelBackColor",oG2antt:BackColor()) oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor()) oEditor := oG2antt:Columns():Add("Edit"):Editor() oEditor:EditType := 1/*EditType*/ oEditor:SetProperty("Option",48/*exEditSelStart*/,-1) oItems := oG2antt:Items() oItems:AddItem("000") oItems:AddItem("111") oItems:AddItem("222") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2311 |
How can I show the overview with a different color except or outside the selection
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABVIDg6AADACAxRDAMgBQKAAzAJBIYhiGgcYCgMZBSDeCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADE2YAoJDUN4nDKMMDybBkRxtDCPIDnGQoDiGI4nSbKIzSCKMQhrEKZZrnaLJFgOTY8ABLEBvfSgASof6MKBlKhKGoiUo2SCFEaBTBNHxDL6raqqWJ5HDINQlWzbcjjKKFYRbOqTZDkGj4XqKTo3YBAdZSXJsXwTGKkji3ZgMOR3HaQaTjOgINpuDZdRzkUYZUDFSwSDqQIRtCpbJqzFZDZbLNbYBYME47AayID0CbdCgmaalSZHNxbVa0BzpXrFLw1TLoDy8AJ+ABseKzfo9PxdIygZRzKJ8aofE+YxynIfJcC8QgbCmL5eiEPIKH6RABlibJpicW4/FcAx/HOYRGmud4+CcHxdmiDhkGEIIIEkQJSGMHQHFGSBlFEUITEmewAAQIQ2AYRpDGQJAoEIXhXCkCB5kmSAdmg" +; "VZPmgZJ8gaT4oHSeIHk8aIEnWCJiEiFgmgmYoIiYJIIE8aB8niB0pmyfIGE+ZYmDQPpjgOUg6DqY5DgYPg2mQAxqEKEJkEkFhGhGZIJA4QA2mOY4GDwOsumCe4NAACJKDoPQOFkZJThaSoZHSGYXmYCYGGKGJmEmFhmCsJoDFYag5iaSISDIAAjAkPJLhyS4JlYbA5iSeZmHqHpnkmdh+hOZx5lSOAzGgSQ+DAAAimkNIkiKTh6DSbIjmkChGhKJJpEoVoWiSaJThyKImmSWI4ACCwNkqBhgDsahKhaJopmqComiqKpqkqEhghKYpAAIJIQmYA46jaLZrgqZo6i6a5KnaPotiZRQkiyIg6lIXw7myCwmkqMpsksNpOjObQLCKQYQiwOpOEKGAPAsZpajabZLHaXo3m4C4GlmNJNisVpFjWZZzkaao6m6S42m6O5vAuRpyjqLhLhidYxgmE5KnqPpvkudp+j+cAMAcAo+i8WIOkSPZuguZwDkKcJMDafp" +; "BE8XAengPJxEwVwWkWcYMGcGpGnGTBTBCRIwhkXwikichMhcJpJnKDIPB+NYNimAgqkucwMkcMoInKO4fC2F5ikyZw6k6c5MncPpPnOLJXAiTZJhOXxGlGdINCcSpSnSTQ3E6UY0CuYgulSdRNFcVpVnWDRnFSVBwh0axeledgNFsXJRA+HYXGaWZ2g2JxqlqdpNjcZZYmYCJDHKXJ3E2K4doux3gbE8OEF4ygtjuH6L8eAHAHgFGCO8bY2QZgZDiBwJ4FRijxE4G8DoxBxj6B6EINwTADjvBaMseYHBng1GaPMTg7wepxA4J4Rx8RjgfCYFMeoEQ6BpGqPUTob2MD2A6IQLoNAKiHAuG0WYAAJCVBCCETAHR3DMFWPgDwD29j4E8CoV4sw7imAIIcJASggAHBeBIJw5grikCmHoSYNxWjrH2BMAoNgqAZE8O0GYEg5DgAIG8DgxwjhXGaCYZIcgnxBGSDILgmwTjKHkJMNwqgjCREoGEC4RRMifHqJc" +; "YokQ6BgEYJEUIaQOhlHIIESAECAg=") oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor()) oG2antt:SetProperty("Background",199/*exOverviewSelResize*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:SetProperty("Background",200/*exOverviewSelOut*/,AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oG2antt:Chart():SetProperty("OverviewSelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oG2antt:SetProperty("Background",201/*exOverviewSelUnit*/,0x1000000) oChart := oG2antt:Chart() oChart:FirstVisibleDate := "06/21/2001" oChart:SetProperty("PaneWidth",.F.,48) oChart:OverviewVisible := 31746/*0x400+exOverviewShowSelMargins+exOverviewShowMargins+exOverviewShowDateTimeScaleBottom+exOverviewShowAllVisible*/ oChart:OverviewHeight := 64 oChart:LevelCount := 2 oChart:UnitScale := 4096/*exDay*/ oChart:SetProperty("Label",65536/*exHour*/,"") oChart:SetProperty("Label",1048576/*exMinute*/,"") oChart:SetProperty("Label",16777216/*exSecond*/,"") oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/ oG2antt:Columns():Add("Column") oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","07/02/2001","07/11/2001") oItems:AddBar(oItems:AddItem("Item 3"),"Task","11/02/2001","11/11/2001") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2310 |
Resize the chart using the overview's selection left and right margins (blue)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor()) oG2antt:SetProperty("Background",199/*exOverviewSelResize*/,AutomationTranslateColor( GraMakeRGBColor ( { 0,0,255 } ) , .F. )) oChart := oG2antt:Chart() oChart:FirstVisibleDate := "06/21/2001" oChart:SetProperty("PaneWidth",.F.,48) oChart:OverviewVisible := 31746/*0x400+exOverviewShowSelMargins+exOverviewShowMargins+exOverviewShowDateTimeScaleBottom+exOverviewShowAllVisible*/ oChart:OverviewHeight := 64 oChart:LevelCount := 2 oChart:UnitScale := 4096/*exDay*/ oG2antt:Columns():Add("Column") oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","07/02/2001","07/11/2001") oItems:AddBar(oItems:AddItem("Item 3"),"Task","11/02/2001","11/11/2001") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2309 |
Resize the chart using the overview's selection left and right margins (black)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor()) oG2antt:SetProperty("Background",199/*exOverviewSelResize*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oChart := oG2antt:Chart() oChart:FirstVisibleDate := "06/21/2001" oChart:SetProperty("PaneWidth",.F.,48) oChart:OverviewVisible := 31746/*0x400+exOverviewShowSelMargins+exOverviewShowMargins+exOverviewShowDateTimeScaleBottom+exOverviewShowAllVisible*/ oChart:OverviewHeight := 64 oChart:LevelCount := 2 oChart:UnitScale := 4096/*exDay*/ oG2antt:Columns():Add("Column") oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","07/02/2001","07/11/2001") oItems:AddBar(oItems:AddItem("Item 3"),"Task","11/02/2001","11/11/2001") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2308 |
Disable temporarily the column's sort, resize and drag and drop
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:OnResizeControl := 1/*exResizeChart*/ oG2antt:SortBarVisible := .T. oG2antt:SortBarCaption := "<fgcolor 808080><c>the header and the sort-bar are disabled (no drag and drop is allowed)" oG2antt:AllowGroupBy := .T. oG2antt:HeaderEnabled := .F. oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:Columns():Add("Index"):FormatColumn := "1 index ``" oG2antt:Columns():Add("Pos"):FormatColumn := "1 apos ``" oG2antt:Columns():Add("Edit"):Editor():EditType := 1/*EditType*/ oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:DrawGridLines := 2/*exVLines*/ oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor ( { 224,224,224 } ) , .F. )) oChart := oG2antt:Chart() oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,196) oChart:GridLineStyle := 512/*exGridLinesGeometric*/ oChart:DrawGridLines := -1/*exAllLines*/ oLevel := oChart:Level(1) oLevel:DrawGridLines := .T. oLevel:SetProperty("GridLineColor",oG2antt:GridLineColor()) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2307 |
Adds a Finish-Start(FS) link (method 3)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:AddLink("Link1",h1,"",h2,"") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2306 |
Adds a Start-Start(SS) link (method 3)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:AddLink("Link1",h1,"",h2,"") oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,0) oItems:SetProperty("Link","Link1",7/*exLinkEndPos*/,0) oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2305 |
Adds a Finish-Finish(FF) link (method 3)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:AddLink("Link1",h1,"",h2,"") oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,2) oItems:SetProperty("Link","Link1",7/*exLinkEndPos*/,2) oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2304 |
Adds a Start-Finish(SF) link (method 3)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:AddLink("Link1",h1,"",h2,"") oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,0) oItems:SetProperty("Link","Link1",7/*exLinkEndPos*/,2) oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2303 |
Adds a Finish-Start(FS) link (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:SetProperty("ItemBar",h2,"",270/*exBarPredecessor*/,"1FS") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2302 |
Adds a Start-Start(SS) link (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:SetProperty("ItemBar",h2,"",270/*exBarPredecessor*/,"1SS") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2301 |
Adds a Finish-Finish(FF) link (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:SetProperty("ItemBar",h2,"",270/*exBarPredecessor*/,"1FF") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2300 |
Adds a Start-Finish(SF) link (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:SetProperty("ItemBar",h2,"",270/*exBarPredecessor*/,"1SF") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2299 |
Adds a Start-Finish(SF) link (method 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:AddLink("Link1",h1,"",h2,"") oItems:SetProperty("Link","Link1",260/*exLinkType*/,"SF") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2298 |
Adds a Finish-Finish(FF) link (method 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:AddLink("Link1",h1,"",h2,"") oItems:SetProperty("Link","Link1",260/*exLinkType*/,"FF") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2297 |
Adds a Start-Start(SS) link (method 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:AddLink("Link1",h1,"",h2,"") oItems:SetProperty("Link","Link1",260/*exLinkType*/,"SS") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2296 |
Adds a Finish-Start(FS) link (method 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h1 := oItems:AddItem("Item 1") oItems:AddBar(h1,"Task","01/03/2001","01/06/2001") h2 := oItems:AddItem("Item 2") oItems:AddBar(h2,"Task","01/03/2001","01/06/2001") oItems:AddLink("Link1",h1,"",h2,"") oItems:SetProperty("Link","Link1",260/*exLinkType*/,"FS") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2295 |
What is the difference between lags with "W" or without
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oBar := oChart:Bars():Add("Task:Split") oBar:Shortcut := "Task" oBar:SetProperty("Def",20/*exBarKeepWorkingCount*/,.T.) oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/06/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/03/2001","01/06/2001") oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/03/2001","01/06/2001") oItems:SetProperty("ItemBar",oItems:ItemByIndex(0),"",271/*exBarSuccessor*/,"2SF:-1,3SF:-1W") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2294 |
What is the difference between lags with "W" or without
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/06/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/03/2001","01/06/2001") oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/03/2001","01/06/2001") oItems:SetProperty("ItemBar",oItems:ItemByIndex(0),"",271/*exBarSuccessor*/,"2SF:-1,3SF:-1W") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2293 |
How can I remove all outgoing links
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2001","01/04/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/05/2001","01/08/2001") oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/09/2001","01/12/2001") oItems:AddLink("L1",oItems:ItemByIndex(0),"",oItems:ItemByIndex(1),"") oItems:AddLink("L2",oItems:ItemByIndex(1),"",oItems:ItemByIndex(2),"") oItems:SetProperty("ItemBar",oItems:ItemByIndex(1),"",271/*exBarSuccessor*/,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2292 |
How can I remove all incoming links
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/01/2001","01/04/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/05/2001","01/08/2001") oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/09/2001","01/12/2001") oItems:AddLink("L1",oItems:ItemByIndex(0),"",oItems:ItemByIndex(1),"") oItems:AddLink("L2",oItems:ItemByIndex(1),"",oItems:ItemByIndex(2),"") oItems:SetProperty("ItemBar",oItems:ItemByIndex(1),"",270/*exBarPredecessor*/,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2291 |
How do I add a link between two bars (method 3)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h := oItems:AddItem("Item 1") oItems:AddBar(h,"Task","01/01/2001","01/04/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/05/2001","01/08/2001") oItems:SetProperty("ItemBar",h,"",271/*exBarSuccessor*/,"2SF") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2290 |
How do I add a link between two bars (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Name") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oItems := oG2antt:Items() h := oItems:AddItem("Item 1") oItems:AddBar(h,"Task","01/01/2001","01/04/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/05/2001","01/08/2001") oItems:SetProperty("ItemBar",h,"",270/*exBarPredecessor*/,"2SF") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2289 |
Highlight the selected-link while editing the predecessor/successor column
PROCEDURE OnAddLink(oG2antt,LinkKey) oG2antt:Items():SetProperty("Link",LinkKey,15/*exLinkShowRound*/,3) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4 LOCAL oColumns LOCAL oEditor,oEditor1 LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:AddLink := {|LinkKey| OnAddLink(oG2antt,LinkKey)} /*Occurs when the user links two bars using the mouse.*/ oG2antt:BeginUpdate() oG2antt:OnResizeControl := 1/*exResizeChart*/ oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:ColumnAutoResize := .F. oG2antt:HeaderHeight := 32 oG2antt:DefaultItemHeight := 28 oG2antt:SetProperty("BackColorLevelHeader",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oG2antt:SetProperty("Background",197/*exPSLinkColorEditSel*/,AutomationTranslateColor( GraMakeRGBColor ( { 160,160,160 } ) , .F. )) oG2antt:SetProperty("Background",198/*exPSBarColorEditSel*/,AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oColumns := oG2antt:Columns() oColumns:Add("Name"):Width := 48 oColumn := oColumns:Add("Start") oColumn:Width := 48 oColumn:Editor():EditType := 7/*DateType*/ oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1) oColumn1 := oColumns:Add("End") oColumn1:Width := 48 oColumn1:Editor():EditType := 7/*DateType*/ oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,543) oColumn2 := oColumns:Add("Predecessor") oEditor := oColumn2:Editor() oEditor:EditType := 1/*EditType*/ oEditor:EditType := 8/*MaskType*/ oEditor:Mask := ";;;rich" oColumn2:SetProperty("Def",18/*exCellValueToItemBarProperty*/,270) oColumn3 := oColumns:Add("Successor") oEditor1 := oColumn3:Editor() oEditor1:EditType := 1/*EditType*/ oEditor1:EditType := 8/*MaskType*/ oEditor1:Mask := ";;;rich" oColumn3:SetProperty("Def",18/*exCellValueToItemBarProperty*/,271) oColumn4 := oColumns:Add("(I)") oColumn4:FormatColumn := "1 index ``" oColumn4:Position := 0 oColumn4:AllowSizing := .F. oColumn4:Width := 20 oG2antt:ColumnAutoResize := .T. oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:DrawGridLines := -1/*exAllLines*/ oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor ( { 224,224,224 } ) , .F. )) oG2antt:AntiAliasing := .T. oChart := oG2antt:Chart() oChart:ShowLinks := 1/*exShowExtendedLinks*/ oChart:LinksStyle := 0/*exLinkSolid*/ oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,362) oChart:NonworkingDays := 0 oChart:AllowLinkBars := .T. oChart:AllowCreateBar := 2/*exCreateBarAutoEndInclusive*/ oChart:AllowZoomOnFly := -1/*0xfffffcc4+exZoomOnFlyIncludeSelectedItems+exZoomOnFlyBarsOnly+exZoomOnFly+exZoomOnFlyCtrl+exZoomOnFlyShift*/ oChart:GridLineStyle := 512/*exGridLinesGeometric*/ oChart:DrawGridLines := -1/*exAllLines*/ oBar := oChart:Bars:Item("Task") oBar:Height := 15 oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%C5%>") oItems := oG2antt:Items() oItems:AllowCellValueToItemBar := .T. oItems:AddBar(oItems:AddItem("Phase A"),"Task","01/01/2001","01/06/2001") oItems:AddBar(oItems:AddItem("Phase B"),"Task","01/02/2001","01/07/2001") oItems:AddBar(oItems:AddItem("Phase C"),"Task","12/29/2000","01/04/2001") oItems:AddLink("L1",oItems:ItemByIndex(0),"",oItems:ItemByIndex(1),"") oItems:SetProperty("Link","L1",17/*exLinkPDMDelay*/,1) oItems:AddLink("L2",oItems:ItemByIndex(0),"",oItems:ItemByIndex(2),"") oItems:AddLink("L3",oItems:ItemByIndex(2),"",oItems:ItemByIndex(1),"") oItems:SchedulePDM(0,"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2288 |
Adding an editable successor column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oColumn,oColumn1 LOCAL oColumns LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oColumns := oG2antt:Columns() oColumns:Add("Name"):Width := 48 oColumn := oColumns:Add("Successor") oEditor := oColumn:Editor() oEditor:EditType := 1/*EditType*/ oEditor:EditType := 8/*MaskType*/ oEditor:Mask := ";;;rich" oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,271) oColumn1 := oColumns:Add("(I)") oColumn1:FormatColumn := "1 index ``" oColumn1:Position := 0 oColumn1:AllowSizing := .F. oColumn1:Width := 20 oG2antt:ColumnAutoResize := .T. oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:DrawGridLines := -1/*exAllLines*/ oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor ( { 224,224,224 } ) , .F. )) oG2antt:AntiAliasing := .T. oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,256) oChart:AllowLinkBars := .T. oChart:AllowCreateBar := 2/*exCreateBarAutoEndInclusive*/ oItems := oG2antt:Items() oItems:AllowCellValueToItemBar := .T. oItems:AddBar(oItems:AddItem("Phase A"),"Task","01/01/2001","01/06/2001") oItems:AddBar(oItems:AddItem("Phase B"),"Task","01/02/2001","01/07/2001") oItems:AddBar(oItems:AddItem("Phase C"),"Task","12/29/2000","01/04/2001") oItems:AddLink("L1",oItems:ItemByIndex(0),"",oItems:ItemByIndex(1),"") oItems:AddLink("L2",oItems:ItemByIndex(0),"",oItems:ItemByIndex(2),"") oItems:AddLink("L3",oItems:ItemByIndex(2),"",oItems:ItemByIndex(1),"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2287 |
Adding an editable predecessor column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oColumn,oColumn1 LOCAL oColumns LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oColumns := oG2antt:Columns() oColumns:Add("Name"):Width := 48 oColumn := oColumns:Add("Predecessor") oEditor := oColumn:Editor() oEditor:EditType := 1/*EditType*/ oEditor:EditType := 8/*MaskType*/ oEditor:Mask := ";;;rich" oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,270) oColumn1 := oColumns:Add("(I)") oColumn1:FormatColumn := "1 index ``" oColumn1:Position := 0 oColumn1:AllowSizing := .F. oColumn1:Width := 20 oG2antt:ColumnAutoResize := .T. oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:DrawGridLines := -1/*exAllLines*/ oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor ( { 224,224,224 } ) , .F. )) oG2antt:AntiAliasing := .T. oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,256) oChart:AllowLinkBars := .T. oChart:AllowCreateBar := 2/*exCreateBarAutoEndInclusive*/ oItems := oG2antt:Items() oItems:AllowCellValueToItemBar := .T. oItems:AddBar(oItems:AddItem("Phase A"),"Task","01/01/2001","01/06/2001") oItems:AddBar(oItems:AddItem("Phase B"),"Task","01/02/2001","01/07/2001") oItems:AddBar(oItems:AddItem("Phase C"),"Task","12/29/2000","01/04/2001") oItems:AddLink("L1",oItems:ItemByIndex(0),"",oItems:ItemByIndex(1),"") oItems:AddLink("L2",oItems:ItemByIndex(0),"",oItems:ItemByIndex(2),"") oItems:AddLink("L3",oItems:ItemByIndex(2),"",oItems:ItemByIndex(1),"") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2286 |
Adding an Index column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn LOCAL oColumns LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Chart():SetProperty("PaneWidth",.T.,0) oColumns := oG2antt:Columns() oColumns:Add("Name"):Width := 48 oColumn := oColumns:Add("Index") oColumn:FormatColumn := "1 index ``" oColumn:Position := 0 oColumn:AllowSizing := .F. oColumn:Width := 48 oItems := oG2antt:Items() oItems:AddItem("Phase A") oItems:AddItem("Phase B") oItems:AddItem("Phase C") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2285 |
Create a new bar should start at 1 day (after moving some pixel to the right 1 days is showing) and new days should been showing as soon as you hit the next day. How can I do that (create bar manually)
PROCEDURE OnCreateBar(oG2antt,Item,DateStart,DateEnd) oG2antt:Items():AddBar(Item,"Task",DateStart,DateEnd,"","new") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:CreateBar := {|Item,DateStart,DateEnd| OnCreateBar(oG2antt,Item,DateStart,DateEnd)} /*Fired when the user creates a new bar.*/ oG2antt:BeginUpdate() oG2antt:OnResizeControl := 1/*exResizeChart*/ oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:Columns():Add("Index"):FormatColumn := "1 index ``" oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:DrawGridLines := 1/*exHLines*/ oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor ( { 224,224,224 } ) , .F. )) oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oChart:NonworkingDays := 0 oChart:AllowLinkBars := .T. oChart:AllowCreateBar := -2/*exCreateBarManualEndInclusive*/ oChart:AllowZoomOnFly := -1/*0xfffffcc4+exZoomOnFlyIncludeSelectedItems+exZoomOnFlyBarsOnly+exZoomOnFly+exZoomOnFlyCtrl+exZoomOnFlyShift*/ oChart:GridLineStyle := oG2antt:GridLineStyle() oChart:DrawGridLines := -1/*exAllLines*/ oLevel := oChart:Level(1) oLevel:DrawGridLines := .T. oLevel:SetProperty("GridLineColor",oG2antt:GridLineColor()) oItems := oG2antt:Items() oItems:AddItem("") oItems:AddItem("") oItems:AddItem("") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2284 |
Create a new bar should start at 1 day (after moving some pixel to the right 1 days is showing) and new days should been showing as soon as you hit the next day. How can I do that (create bar automatically)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:OnResizeControl := 1/*exResizeChart*/ oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:Columns():Add("Index"):FormatColumn := "1 index ``" oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:DrawGridLines := 1/*exHLines*/ oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor ( { 224,224,224 } ) , .F. )) oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/28/2000" oChart:SetProperty("PaneWidth",.F.,64) oChart:NonworkingDays := 0 oChart:AllowLinkBars := .T. oChart:AllowCreateBar := 2/*exCreateBarAutoEndInclusive*/ oChart:AllowZoomOnFly := -1/*0xfffffcc4+exZoomOnFlyIncludeSelectedItems+exZoomOnFlyBarsOnly+exZoomOnFly+exZoomOnFlyCtrl+exZoomOnFlyShift*/ oChart:GridLineStyle := oG2antt:GridLineStyle() oChart:DrawGridLines := -1/*exAllLines*/ oLevel := oChart:Level(1) oLevel:DrawGridLines := .T. oLevel:SetProperty("GridLineColor",oG2antt:GridLineColor()) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2283 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of working-days when using the DateTickerLabel property (method 4, locale)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:Bars():Add("Task:Split"):Shortcut := "Task" oChart:Bars:Item("Task"):SetProperty("Def",20/*exBarKeepWorkingCount*/,.T.) oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%=value format `ddd dd`%><fgcolor 808080><%=(value=end?` (` + (wcount) + `wd)`:``)%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/01/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2282 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of days when using the DateTickerLabel property (method 4, locale)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%=value format `ddd dd`%><fgcolor 808080><%=(value=end?` (` + (end-start) + `d)`:``)%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/01/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2281 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of days when using the DateTickerLabel property (method 3, english locale)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%=(0 array (0:=(longdate(date(value)) split `,`)) left 3) + ` ` + ((2 array ((1 array =:0) split ` `)) lpad `00`) + (value=end?` (` + (end-start) + `d)`:``)%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/01/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2280 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format for start and end margins, but end margin should display one day before followed by the number of days
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%=(weekday(0:=(value-(value=end?1:0))) array 'Sun Mon Tue Wed Thu Fri Sat' split ' ') + ` ` + day(=:0) + ` ` + ((month(=:0) - 1) array 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec' split ' ') + (value=end?` (` + (end-start) + `d)`:``)%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/01/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2279 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of days when using the DateTickerLabel property (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%ddd%> <%d%> <%mmm%><%=(value=end?` (` + (end-start) + `d)`:``)%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/01/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2278 |
How can I display the "<%ddd%> <%d%> <%mmm%>" format followed by number of days when using the DateTickerLabel property (method 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%=(weekday(value) array 'Sun Mon Tue Wed Thu Fri Sat' split ' ') + ` ` + day(value) + ` ` + ((month(value) - 1) array 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec' split ' ') + (value=end?` (` + (end-start) + `d)`:``)%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/01/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2277 |
How can I display just the end-margin when user resizes the bar
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%=value=start?``:value%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/23/2005","07/03/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2276 |
Is it possible to include the number of days (duration in days, hours, minutes) within the date-label
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:ResizeUnitScale := 65536/*exHour*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%=date(value=end?value-1:value)%><fgcolor 666666><off -4><%=value=end?` ` + ((1:=int(0:= end - start)) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s) ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : ''):``%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/23/2005","07/03/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2275 |
Is it possible to include the number of days within the date-label
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%mmm%> <%d%><fgcolor 808080><%=value=end?` (`+(end - start) + ` days)`:``%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/23/2005","07/03/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2274 |
Is it possible to show the date-label with the bar being created, moved or resized instead below the header-bar
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%mmm%> <%d%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/23/2005","07/03/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2273 |
Date-label customization
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oAppearance LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oAppearance := oG2antt:VisualAppearance() oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABT0GACAADACAxRDAMgBQKAAzAJBIYhiGgcYCgMZBSDeCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCOIwAFBIZhrE4ZRwGCQRRgyI43RhHUBzVIUBxDEaTZLlGY4NjSIYHThPMzyDRlEyBBqVKKoWLZMjiIY2RhJM7SBR0OROGQaRJrewZHDUMJiQjZVoVNTkNyxH6uYzoKSqVACLowTJNFZXDDkeR5JqcKBqChIEpKO5wRriAABVZoAA3Rq+AAuPBJIwYAAyXTIdTwThkBz3R6tchgOw7LxeZJpWbZOo0TgGFwTLDQNCifI7Vi6NJ1DdcKLNNx3tDBdpGXZ4JznGa8a7jN57dr+JQ7U6degACytKxLBeOprHMcA+GafxaAiBIUA0JgziGVJkGUGJIFyUYiBEN5VBsGxCEUEIcn0cAxBgWBijmM4Ekec57n0RwJBgBgCgCEZCC4BoBmAdBwgSApgkgMQcB8YQIEYERHAceBWBa" +; "BYRkGQgagaYY0HAaYHmICIBBwGJiEiFglEcBYYiYKoKhGQRCC6C5inQcBNgyYxIlIMoNGMWI2DCDAigiLgrgiYhohoHoIGIGBmByBwhEgXgXgOYQoEoCoDGCWAWAiAggAgDgDEcH5pGUHAoCWSR2F0cxOjSHQJEAQCAg=") oAppearance:Add(2,"CP:1 -2 -2 4 4") oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",192/*exDateTickerLabelBack*/,0x2000000) oG2antt:SetProperty("Background",193/*exDateTickerLabelFore*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oG2antt:SetProperty("Background",194/*exDateTickerLabelHAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:SetProperty("Background",195/*exDateTickerLabelVAlign*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:SetProperty("Background",196/*exDateTickerLabelHMargin*/,AutomationTranslateColor( GraMakeRGBColor ( { 4,0,0 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%mmm%><br><%d%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/23/2005","07/03/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2272 |
How can I change the visual appearance for the date-label (EBN)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,,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" +; "MDcEA+jCfBfBqRpxkwdwYgsZBzm8IpInITIXCaSdxHMKpKnKTI3C6S4lmgNJSkCT5slcNpNnODJnAMNZzkQJpvDYdAMDUTpQnQRQ7A2UANhuPRKFKZJ4iiVIOHUDRGDmU4higJJrGuQAEAQgI") oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",192/*exDateTickerLabelBack*/,0x1000000) oG2antt:SetProperty("Background",193/*exDateTickerLabelFore*/,AutomationTranslateColor( GraMakeRGBColor ( { 10,10,10 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := " <%mmm%> <%d%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/23/2005","07/03/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2271 |
How can I change the visual appearance for the date-label (solid colors)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ScrollBars := 2050/*exVScrollEmptySpace+exVertical*/ oG2antt:SetProperty("Background",192/*exDateTickerLabelBack*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oG2antt:SetProperty("Background",193/*exDateTickerLabelFore*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,96) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:FirstVisibleDate := "06/20/2005" oChart:LevelCount := 2 oChart:DrawDateTicker := .T. oChart:DateTickerLabel := "<%mmm%> <%d%>" oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/28/2005") oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/23/2005","07/03/2005") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2270 |
Expandable-caption
PROCEDURE OnAnchorClick(oG2antt,AnchorID,Options) DevOut( Transform(AnchorID,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:AnchorClick := {|AnchorID,Options| OnAnchorClick(oG2antt,AnchorID,Options)} /*Occurs when an anchor element is clicked.*/ oG2antt:BeginUpdate() oG2antt:ColumnAutoResize := .T. oG2antt:TreeColumnIndex := -1 oG2antt:DrawGridLines := -1/*exAllLines*/ oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oG2antt:ShowFocusRect := .F. oG2antt:Columns():Add("Default") oItems := oG2antt:Items() oItems:AddItem("before item") h := oItems:AddItem("<solidline> <c><b>Bank Account 1</b></solidline><br>+ owner: String <r><a 1;e64=gA8ABzABvABsABpABkg8JABuABlAA+AAgAECMcTi4AMwAM4AjMGhEGOUVAA4AAwk8plcqihwAElg0wiUlOkOiUEgQvgcFhsKhkIhUQiUUnccj0gn0jmMagUlowAMNOpEfkMNkkmlEqrctjQmAAjAA5AA2sssHcbnkdq1Ln1QtVSjQAAEBA==>▲</a><br><solidline>+ balance: Currency = 0</solidline><br>+ deposit(amount: Currency)<r><a 2;e64=gA8ABjAA+AECMwAM8DABvABshoAOQAEAAHAAGEWjEajMGNoAMoAOgANERMgAOcHAAvAEJhcEh0Qh0Tg0CmkqMMFlUuhkxiMTisXjNCjk6EwAEYAHIAG1MjY7lUsnkwh8/nUClk5gwAAEBA==>&" +; "#9650;</a><br>+ withdraw(amount: Currency)") oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/) oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/) h := oItems:AddItem("<solidline> <c><b>Bank Account 2</b><br> <c><fgcolor 808080>properties</solidline><a 1;e64=gArAAgABvAB3ABuABlAByAA6gYAKYAOkNABphIAM8RHgAMMRGIAHcLAA2AA0AA9jQAIIAHEsABCAB6mEyO01ABznBwnBrlcvJU4Os4NkwlsClstjctIoAIYAJoAMYAKkXk8wqMIltRlEtNVQABHABoAFNsRPABVABWo1XpMHAE+l88otTONWslasoAosbGFwjFqoton1owN7jZRAE3jdTI1jnIAJeQnxJyFqxWHtUKqdTr9/jcKv9fNtgj8bwUFuFbABOAFonlNM1xsGun0+0tFpt3h1TitfxWlt9ft41toyyM6nRIqQAMUZnxkAF3kJMjMhxUVtkT4FtpsylsqlQ+AEdh3kEwAEYAHMlAHGv8jjovjwA8kd5/n8uRg1FjDpP8jKGPIgSCOej6io+ziSIgginqGhyHIZBY8o" +; "ilSCL++b+L4q0AKshUBgBESAgA==><r>▼</a></fgcolor><br><c><fgcolor 808080>methods</fgcolor><r><a 2;e64=gArAAgABkABlABwABvABzABpAB0AAoABhABthYAOoAN0RAA6gYAIcaAByksHjgAMYAPIAFIAHkVkIyAA7lA2AA0AA9ABnABBAA4n4AIQANVDoECoBFkQAJoAO9Dp9CIlDop2q0NABojNAJ4AKNDplAoBIpAAI4AphXo1qmVHp9pJ1dp10r8+oFzphSut4AFfldmsgArFLABKrcqt1cGFgxONKk9AGNkcYNYAON1p5GABsABVklcy54h91yMQhxYttzkdHy84plRwxZodmJNDtIxutH2g3zufrUdy9RrlCF8p0Ejz2XGuS2ViolDnk8H0wk/VEwAEYAHIAnHNxs2mPHi3VmJi64AgUEqMQiVcg0mi1RikWjEMjcdiUggkjjaTJMhCOpWlqXgAACAg><fgcol" +; "or 808080>▼</fgcolor></a>") oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/) oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/) oItems:AddItem("after item") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2269 |
Expandable-caption
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ColumnAutoResize := .T. oG2antt:TreeColumnIndex := -1 oG2antt:DrawGridLines := -1/*exAllLines*/ oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oG2antt:ShowFocusRect := .F. oG2antt:Columns():Add("Default") oItems := oG2antt:Items() oItems:AddItem("before item") h := oItems:AddItem("<solidline><b>Header</b></solidline><br>Line1<r><a ;exp=show lines>+</a><br>Line2<br>Line3") oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/) oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/) oItems:AddItem("after item") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2268 |
Can I change the pattern for a specific bar only
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:FirstVisibleDate := "12/31/2009" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,96) oBar := oChart:Bars:Item("Task") oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oBar:SetProperty("EndColor",oBar:Color()) oG2antt:Columns():Add("Types") oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","") h := oItems:AddItem("W/h Pattern") oItems:AddBar(h,"Task","01/04/2010","01/09/2010","") oItems:SetProperty("ItemBar",h,"",42/*exBarPattern*/,6) oItems:AddBar(oItems:AddItem("Original"),"Task","01/04/2010","01/09/2010","") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2267 |
Force hover-all feature
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:SetProperty("Background",500/*exScrollHoverAll*/,-1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2266 |
Disable hover-all feature (Windows 11 or greater)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:SetProperty("Background",500/*exScrollHoverAll*/,AutomationTranslateColor( GraMakeRGBColor ( { 1,0,0 } ) , .F. )) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2265 |
I'm using the Milestone bar type, but find it to small and want to enlarge it. I can change the bar height, but then the shape gets a bit distorted (e.g. it doesn't scale properly)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oAppearance LOCAL oBar LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oAppearance := oG2antt:VisualAppearance() oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABJYCg6AADACAxRDgMQBQKAAzQFAYZhmGSGAAGIZhXgmFgAQhFcZQSKUOQTDKMIRfeQwAiNf4hQKBMIjKKAShaHCVIDlSThYAKCQxDZNUCQXDcdRRDaBR7hGgoaj6JolSRFUgSABEEigNIxToOU4jFgeCR2C7AZBEbTENBtBIUKDsKA4IBiFxAVjQFpSNZlWzdN64LhuK47UrWbYiXZeN5XXblaTxPrAMBwKzrLwPBqHXrfeIYXhlDzVC7GchxTCsSxXCaPY7lWZZPRGN49ODMNBibL9EwSA6laToWpRVpGSYpVrGdT2KgNQxbL61YLse5ZTrGF5vXrONz4LBeAwHP7FXLwfJaVxFeaPZq7eT6LRfEKa5PmgdJ7DuLotkeL5Am0eA4F2ToOHeK5hnOco8HIfQ/GOUZumWeY9h2fx/lOJ5Im8bY+j+LpWnecYxH6YAHgWMB/hgeAGAYe4aheSZ5gGYJICGG4BByaA2BIfRgjY" +; "RgTgWihaAobhhggdgBG+IY1nYHoImCRgaBAeQiEiJgHHGIgVnoKoLmEOBFmUchjAiVgYF4XZoloOoImKaJNGyDpkAiJZdggZAZBYLxphmWQaEqDRYmkLhOhEZJZD4UoMFSGJ6FOFZhheEhDhYJZHGYW4PGWWYFlSDQjmkbhi0WBZaCcepmgmBgygsJtLHCCYnBkBh0hkWAJlYMIICeBgKHqBxhimdh3h+ZYWEoa4MigR4hh6IZnhoJheGuIpYD6DhumAOhFh+JJaCedoWgIaYGg2RYjCgahNnGIIbgmaZqigKI5jmaoVGqOIiEuKxjnobZjhGKwJCKNRoCSSpejaLorggeo8i8a51koVIwFaeoijOIRsEsApJhgIArC4ZIziaKg+lCM5tDsRoUjUXRqkqWIrhuSxulmKQtmkIYsjgY4LGqZIum4e4UAAOpRBQJQBICA==") oAppearance:Add(2,"CP:1 1 1 11 -2") oG2antt:DefaultItemHeight := 32 oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:Columns():Add("Task") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,128) oChart:FirstVisibleDate := "01/01/2001" oBar := oChart:Bars:Item("Milestone") oBar:Height := 24 oBar:SetProperty("Color",0x2000000) oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Milestone","01/02/2001","01/02/2001") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2264 |
I'm using the Milestone bar type, but find it to small and want to enlarge it. I can change the bar height, but then the shape gets a bit distorted (e.g. it doesn't scale properly)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oAppearance LOCAL oBar LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oAppearance := oG2antt:VisualAppearance() oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABXYCg6AADACAxRDgMQBQKAAzQFAYZhmGSGAAGIZhXgmFgAQhFcZQSKUOQTDKMIRfeQwAiNf4hQKBMIjKKAShaHCVIDlSThYAKCQxDZNUCDNDYAR1FCeQACCCaDgOII/SZJMiRNIEQARBIoDRMM5DVLIZYHQjCcBkERtNQvHiBRQoSw6GAAGIaRDQMZSNZlWxMfx9XyeBoVeapFhbO4mZavEyCeTgfS3MBwLA3XZxTTxKIaD6KASbepEKh6VDNF52bYrA6XWy/T6PW7GDLmUY1H5UQpnfR4Uj/JyUT7KIS7bpMNTOWYfZ7XcxibKaZw2LDvIoxWL6UosH7UEpXfR/RLGcIVL7KKTLbpQNp8GwYXJWAMBJ+mubB3gaV5qhyNp/FIFhfmoLgPg+RZkmCeA7gWN46iSXJ4G2Mh6m+ax7nGdJ4G6MxegoXpaiSPJ/CmRZTnyJR3iAOAKASAZgGOfImBcD5iigXx7B6ZhVHAPhPHM" +; "WJDD0CohkSfQrEYE58ioGAPnKJBfggYg4goJIJmIaImCOA8gjQYg9kqMZAngNQMAOSIrByT5CmAcA/ksMYon8K4GEOfIsBjLQuESEYkFkHhKhIZJJCCLQYk+YpEGZNhBkSbgrkeM7viIT5zBCAA/kucZsn8LxHHOfI4BwT5ylQbU9kGLJ/CyBoJj4cYcCcKZUjYGwPkMDDlkqcZhgUMwPBKaIID8DQSReMoIVYRQgmiIgIn8MJlnMCB+VKaYUjpOxylgboaEbQQ3BuD5TBgfg8kuAgMncbobgOYJjDWTwCmCB1oGIVJ/DQCQDnyTAjCsYgujkP5MjqaJKhcDIaCSRwg3eMIGDyCxyAieA3k0FxRG8dgOCMVJxC8CJTnCVwmg+cxchgP5NCIUpcjeLZbHyfw1gkexYhteZSDjkQNAeSYDGyT5LCyUQ8EvL58DeSkrFwJ+ZmSG4/G+cxsh0PxNkKDJ0C+CQGkWOBthadpQniNBtDIMJ8DiSlWGMKYPnOCI" +; "mD8TgiiidI6GyO41huQwdGcYorj1g5smIKZPkOBweC+SQjmCYA0i6bIRjYbgYFMNJvC0CBLCCCA9k2Iwik6SQOjWJQDEAQCAg") oAppearance:Add(2,"CP:1 -6 0 20 0") oG2antt:DefaultItemHeight := 32 oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:Columns():Add("Task") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,128) oChart:FirstVisibleDate := "01/01/2001" oBar := oChart:Bars:Item("Milestone") oBar:Height := 28 oBar:SetProperty("Color",0x2000000) oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Milestone","01/02/2001","01/02/2001") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2263 |
I'm using the Milestone bar type, but find it to small and want to enlarge it. I can change the bar height, but then the shape gets a bit distorted (e.g. it doesn't scale properly)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:DefaultItemHeight := 32 oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:Columns():Add("Task") oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,128) oChart:FirstVisibleDate := "01/01/2001" oChart:Bars:Item("Milestone"):Height := 28 oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Milestone","01/02/2001","01/02/2001") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2262 |
Display the bar's tooltip at runtime
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip(oG2antt:Chart:BarFromPoint(-1,-1)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"...") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2261 |
Includes the cell's state and user-data to bar's tooltip
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Def"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.) oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,96) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<%=%C0%><br>Start: <%=%1%><br>End: <%=%2%><br>State: <b><%=%CS0%></b><br>UserData: <b><%=%CD0%></b>") oItems := oG2antt:Items() h := oItems:AddItem("Machine 1") oItems:SetProperty("CellState",h,0,1) oItems:SetProperty("CellData",h,0,"just some data") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") h := oItems:AddItem("Machine 2") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","B","B") oItems:SetProperty("CellData",h,0,"just nother data") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2260 |
Shows the tooltip of the object moved relative to its default position
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip("<null>","<null>",,"+8","+8") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2259 |
Adds, changes or replaces the title of the object's tooltip
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip("<null>",oG2antt:Chart:BarFromPoint(-1,-1)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2258 |
Adds, changes or replaces the object's tooltip
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip(oG2antt:Chart:BarFromPoint(-1,-1)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2257 |
Shows a new tooltip and title at current position
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip("new content","new title") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2256 |
Shows a new tooltip and title moved relative to the current position
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip("new content","new title",,"+8","+8") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2255 |
Displays a different tooltip at a fixed position
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip("new content","",,128,128) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2254 |
Hide the tooltip
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) oG2antt:ShowToolTip("","") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<b><%=%C0 + ` ` + %9%></b><br>Start: <b><%=%1%></b><br>End: <b><%=%2%></b>") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2253 |
I need 2 bars that are linked together and cannot be moved/splitted alone (moving one should move the two bars, like a « Group » of bars). How can I achieve that
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Task") oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/ oG2antt:HeaderAppearance := 4/*Etched*/ oChart := oG2antt:Chart() oChart:FirstVisibleDate := "01/01/2001" oChart:SetProperty("PaneWidth",.F.,96) oChart:LevelCount := 2 oItems := oG2antt:Items() oItems:AddItem() h1 := oItems:AddItem("Task 1") oItems:AddBar(h1,"Task","01/05/2001 12:00:00","01/07/2001","T1") oItems:SetProperty("ItemBar",h1,"",4/*exBarHAlignCaption*/,18) oItems:AddBar(h1,"Task","01/03/2001","01/04/2001 12:00:00","T2") oItems:SetProperty("ItemBar",h1,"T2",33/*exBarColor*/,255) oItems:GroupBars(h1,"T1",.T.,h1,"T2",.T.,27,0) oItems:AddItem() oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2252 |
How can I show the tooltip programmatically ( I want to be able to set the tooltip content dynamically just before the tooltip start to appear, not using the exBarTooltip )
PROCEDURE OnToolTip(oG2antt,Item,ColIndex,Visible,X,Y,CX,CY) oG2antt:ShowToolTip(oG2antt:Chart:BarFromPoint(-1,-1)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:ToolTip := {|Item,ColIndex,Visible,X,Y,CX,CY| OnToolTip(oG2antt,Item,ColIndex,Visible,X,Y,CX,CY)} /*Fired when the control prepares the object's tooltip.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Def") oChart := oG2antt:Chart() oChart:AllowCreateBar := 0/*exNoCreateBar*/ oChart:SetProperty("PaneWidth",.F.,64) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"...") oItems := oG2antt:Items() h := oItems:AddItem("Task") oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A") oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B") oItems:AddBar(h,"Task","01/08/2010","01/11/2010","C","C") oItems:GroupBars(h,"A",.F.,h,"B",.T.,39) oItems:GroupBars(h,"B",.F.,h,"C",.T.,39) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2251 |
I'd like to move itembars from one item to another, using .Chart.Bars("Task").Def(exBarCanMoveToAnother) = True this works for any new bar. The question is how can I specify this feature for bars already created
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:DefaultItemHeight := 32 oG2antt:DrawGridLines := -2/*exRowLines*/ oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:HeaderAppearance := 4/*Etched*/ oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:DrawGridLines := -2/*exRowLines*/ oChart:GridLineStyle := 512/*exGridLinesGeometric*/ oChart:FirstVisibleDate := "01/01/2001" oChart:SetProperty("PaneWidth",.F.,48) oChart:AllowLinkBars := .F. oBar := oChart:Bars:Item("Task") oBar:OverlaidType := 4/*exOverlaidBarsCascade*/ oBar:SetProperty("Def",3/*exBarCaption*/,"only horizontal") oBar:SetProperty("Def",59/*exBarCaptionVOffset*/,18) oBar:SetProperty("Def",28/*exBarCanMoveToAnother*/,.T.) oG2antt:Columns():Add("Column") oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/05/2001","A") oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/04/2001","01/06/2001","B") oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/03/2001","01/05/2001","C") oItems:SetProperty("ItemBar",0,"<*>",28/*exBarCanMoveToAnother*/,.F.) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2250 |
I'd like to move itembars from one item to another, using .Chart.Bars("Task").Def(exBarCanMoveToAnother) = True this works for any new bar. The question is can I disable this for particular item-bars
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:DefaultItemHeight := 32 oG2antt:DrawGridLines := -2/*exRowLines*/ oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:HeaderAppearance := 4/*Etched*/ oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:DrawGridLines := -2/*exRowLines*/ oChart:GridLineStyle := 512/*exGridLinesGeometric*/ oChart:FirstVisibleDate := "01/01/2001" oChart:SetProperty("PaneWidth",.F.,48) oChart:AllowLinkBars := .F. oBar := oChart:Bars:Item("Task") oBar:OverlaidType := 4/*exOverlaidBarsCascade*/ oBar:SetProperty("Def",3/*exBarCaption*/,"anywhere") oBar:SetProperty("Def",59/*exBarCaptionVOffset*/,18) oBar:SetProperty("Def",28/*exBarCanMoveToAnother*/,.T.) oG2antt:Columns():Add("Column") oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/03/2001","01/05/2001","A") h := oItems:AddItem("Item 2") oItems:AddBar(h,"Task","01/04/2001","01/06/2001","B","only horiontal") oItems:SetProperty("ItemBar",h,"B",28/*exBarCanMoveToAnother*/,.F.) oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/03/2001","01/05/2001","C") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2249 |
I need the top row to display months, while the second to show units in weeks, but can 10 by 10 days days. Is it possible
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,0) oChart:DrawGridLines := 2/*exVLines*/ oChart:FirstVisibleDate := "01/01/2001" oChart:UnitWidth := 30 oChart:LevelCount := 2 oChart:Level(0):Unit := 16/*exMonth*/ oLevel := oChart:Level(1) oLevel:Unit := 4096/*exDay*/ oLevel:Count := 10 oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2248 |
Limit the chart's margins when using the CopyTo method
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart,oChart1 LOCAL oColumn,oColumn1 LOCAL oColumns LOCAL oItems LOCAL var_CopyTo oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:MarkSearchColumn := .F. oColumns := oG2antt:Columns() oColumns:Add("Tasks") oColumn := oColumns:Add("Start") oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1) oColumn:Editor():EditType := 4/*SpinType*/ oColumn1 := oColumns:Add("End") oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2) oColumn1:Editor():EditType := 4/*SpinType*/ oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,196) oChart:LevelCount := 2 oChart:ShowEmptyBars := 1 oChart:FirstVisibleDate := "01/01/2009" oItems := oG2antt:Items() oItems:AllowCellValueToItemBar := .T. oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2009","01/07/2009") oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2009","01/09/2009") oChart1 := oG2antt:Chart() oChart1:StartPrintDate := "01/04/2009" oChart1:EndPrintDate := "01/05/2009" var_CopyTo := oG2antt:CopyTo("c:/temp/xtest.pdf") DevOut( "Look for C:\Temp\xtest.pdf file." ) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2247 |
I want to always keep the bottom item stationary. It can always display even when scrolling vertically. The bar placed at the bottom item is must be movable to other items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL color,h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) color := 15790320 oG2antt:BeginUpdate() oG2antt:Debug := .T. oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/ oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:ShowLockedItems := .T. oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,128) oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/31/2015" oChart:Bars:Item("Task"):SetProperty("Def",28/*exBarCanMoveToAnother*/,.T.) oG2antt:Columns():Add("Column") oItems := oG2antt:Items() oItems:SetProperty("LockedItemCount",0/*exTop*/,3) h := oItems:LockedItem(0/*exTop*/,0) oItems:SetProperty("ItemBackColor",h,color) oG2antt:Chart():SetProperty("ItemBackColor",h,color) oItems:SetProperty("CellValue",h,0,"locked-top 1") oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T1") h := oItems:LockedItem(0/*exTop*/,1) oItems:SetProperty("ItemBackColor",h,color) oG2antt:Chart():SetProperty("ItemBackColor",h,color) oItems:SetProperty("CellValue",h,0,"locked-top 2") oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T2") h := oItems:LockedItem(0/*exTop*/,2) oItems:SetProperty("SelectItem",h,.F.) oItems:SetProperty("ItemDivider",h,0) oItems:SetProperty("ItemHeight",h,2) oItems:AddBar(oItems:AddItem("un-locked item 1"),"Task","01/04/2016","01/08/2016","T3") oItems:AddBar(oItems:AddItem("un-locked item 2"),"Task","01/05/2016","01/09/2016","T4") oItems:SetProperty("LockedItemCount",1/*exMiddle*/,3) h := oItems:LockedItem(1/*exMiddle*/,0) oItems:SetProperty("SelectItem",h,.F.) oItems:SetProperty("ItemDivider",h,0) oItems:SetProperty("ItemHeight",h,2) h := oItems:LockedItem(1/*exMiddle*/,1) oItems:SetProperty("ItemBackColor",h,color) oG2antt:Chart():SetProperty("ItemBackColor",h,color) oItems:SetProperty("CellValue",h,0,"locked-bottom 1") oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T5") h := oItems:LockedItem(1/*exMiddle*/,2) oItems:SetProperty("ItemBackColor",h,color) oG2antt:Chart():SetProperty("ItemBackColor",h,color) oItems:SetProperty("CellValue",h,0,"locked-bottom 2") oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T6") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2246 |
How can I get a cell that shows the sum of a column of minutes in hours + minutes format
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn LOCAL oEditor LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oColumn := oG2antt:Columns():Add("Minutes") oColumn:SortType := 1/*SortNumeric*/ oEditor := oColumn:Editor() oEditor:EditType := 1/*EditType*/ oEditor:Numeric := -1/*exInteger*/ oItems := oG2antt:Items() oItems:AddItem(10) oItems:AddItem(20) oItems:AddItem(30) oItems:AddItem(40) oItems:AddItem(50) h := oItems:AddItem("sum(all,dir,dbl(%0))") oItems:SetProperty("SelectableItem",h,.F.) oItems:SetProperty("SortableItem",h,.F.) oItems:SetProperty("CellValueFormat",h,0,5/*exTotalField+exHTML*/) oItems:SetProperty("CellHAlignment",h,0,2/*RightAlignment*/) oItems:SetProperty("FormatCell",h,0,"'<b>HH:NN</b>: '+ (int(value/60) lpad '00') + ':' + ((value mod 60) lpad '00')") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2245 |
Ensure that a bar fits the chart's visible area (unique keys)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oChart := oG2antt:Chart() oChart:FirstVisibleDate := "03/26/2023" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,128) oG2antt:Columns():Add("Tasks") oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task A"),"Task","01/02/2001","01/12/2001","T1") oItems:AddBar(oItems:AddItem("Task B"),"Task","01/20/2001","01/31/2001","T2") oItems:EnsureVisibleBar(0,"T1") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2244 |
Ensure that a bar fits the chart's visible area
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1,h2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:HeaderAppearance := 4/*Etched*/ oChart := oG2antt:Chart() oChart:FirstVisibleDate := "03/26/2023" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,128) oG2antt:Columns():Add("Tasks") oItems := oG2antt:Items() h1 := oItems:AddItem("Task A") oItems:AddBar(h1,"Task","01/02/2001","01/12/2001","T1") h2 := oItems:AddItem("Task B") oItems:AddBar(h2,"Task","01/20/2001","01/31/2001","T2") oItems:EnsureVisibleBar(h1,"T1") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2243 |
Is it possible to change the visual appearance for the frame to create newly bar by drag and drop
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oG2antt:SetProperty("Background",188/*exChartCreateBar*/,0x1000000) oG2antt:SetProperty("Background",189/*exCreateBarHeight*/,AutomationTranslateColor( GraMakeRGBColor ( { 15,0,0 } ) , .F. )) oChart := oG2antt:Chart() oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:SetProperty("PaneWidth",.F.,128) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2001" oBar := oChart:Bars:Item("Task") oBar:SetProperty("Color",0x1000000) oBar:Height := 15 oG2antt:Columns():Add("Column") oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/07/2001") oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/06/2001","01/14/2001") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2242 |
Highlight the match once the filter is applied
PROCEDURE OnFilterChange(oG2antt) LOCAL format format := oG2antt:FormatABC("`lower(value) replace lower('` + value + `') with '<bgcolor 000000><fgcolor FFFFFF>` + value + `</fgcolor></bgcolor>'`",oG2antt:FilterBarPromptPattern()) oG2antt:Columns:Item(0):FormatColumn := Transform(format,"") oG2antt:Columns:Item(1):FormatColumn := Transform(format,"") oG2antt:Columns:Item(2):FormatColumn := Transform(format,"") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn,oColumn1,oColumn2 LOCAL oColumns LOCAL oItems LOCAL h0 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:FilterChange := {|| OnFilterChange(oG2antt)} /*Occurs when the filter was changed.*/ oG2antt:BeginUpdate() oG2antt:SetProperty("SelBackColor",oG2antt:BackColor()) oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor()) oG2antt:ColumnAutoResize := .T. oG2antt:ContinueColumnScroll := .F. oG2antt:MarkSearchColumn := .F. oG2antt:SearchColumnIndex := 1 oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 23 oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor()) oG2antt:FilterBarCaption := "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)" oG2antt:FilterBarPromptVisible := 2055/*exFilterBarCompact+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/ oG2antt:SetProperty("FilterBarBackColor",oG2antt:BackColor()) oG2antt:FilterBarPromptPattern := "and" oColumns := oG2antt:Columns() oColumn := oColumns:Add("Name") oColumn:SetProperty("Def",17/*exCellValueFormat*/,1) oColumn:FormatColumn := "lower(value)" oColumn1 := oColumns:Add("Title") oColumn1:SetProperty("Def",17/*exCellValueFormat*/,1) oColumn1:FormatColumn := "lower(value)" oColumn2 := oColumns:Add("City") oColumn2:SetProperty("Def",17/*exCellValueFormat*/,1) oColumn2:FormatColumn := "lower(value)" oItems := oG2antt:Items() h0 := oItems:AddItem("Nancy Davolio") oItems:SetProperty("CellValue",h0,1,"Sales Representative") oItems:SetProperty("CellValue",h0,2,"Seattle") h0 := oItems:AddItem("Andrew Fuller") oItems:SetProperty("CellValue",h0,1,"Vice President, Sales") oItems:SetProperty("CellValue",h0,2,"Tacoma") oItems:SetProperty("SelectItem",h0,.T.) h0 := oItems:AddItem("Janet Leverling") oItems:SetProperty("CellValue",h0,1,"Sales Representative") oItems:SetProperty("CellValue",h0,2,"Kirkland") h0 := oItems:AddItem("Margaret Peacock") oItems:SetProperty("CellValue",h0,1,"Sales Representative") oItems:SetProperty("CellValue",h0,2,"Redmond") h0 := oItems:AddItem("Steven Buchanan") oItems:SetProperty("CellValue",h0,1,"Sales Manager") oItems:SetProperty("CellValue",h0,2,"London") h0 := oItems:AddItem("Michael Suyama") oItems:SetProperty("CellValue",h0,1,"Sales Representative") oItems:SetProperty("CellValue",h0,2,"London") h0 := oItems:AddItem("Robert King") oItems:SetProperty("CellValue",h0,1,"Sales Representative") oItems:SetProperty("CellValue",h0,2,"London") h0 := oItems:AddItem("Laura Callahan") oItems:SetProperty("CellValue",h0,1,"Inside Sales Coordinator") oItems:SetProperty("CellValue",h0,2,"Seattle") h0 := oItems:AddItem("Anne Dodsworth") oItems:SetProperty("CellValue",h0,1,"Sales Representative") oItems:SetProperty("CellValue",h0,2,"London") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2241 |
The count of filtered items includes the group-parents. How can I exclude them from count
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:DrawGridLines := 2/*exVLines*/ oG2antt:HeaderAppearance := 1/*Flat*/ oG2antt:HeaderHeight := 24 oG2antt:SortBarHeight := 28 oG2antt:SortBarVisible := .T. oG2antt:AllowGroupBy := .T. oG2antt:Columns():Add("Col 1") oG2antt:Columns():Add("Col 2") oItems := oG2antt:Items() oItems:SetProperty("CellValue",oItems:AddItem("219 Smith"),1,"Ignacio 1234") oItems:SetProperty("CellValue",oItems:AddItem("1666 County Road 309A"),1,"897 Manassa") oItems:SetProperty("CellValue",oItems:AddItem("38 Lone Pine"),1,"Durango 11") oItems:SetProperty("CellValue",oItems:AddItem("612 Jachim Street"),1,"Lamar 222") oG2antt:Layout := "MultipleSort=" + CHR(34) + "C1:1" + CHR(34) + "" oG2antt:FilterBarCaption := "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? leafitemcount + ` result(s)` : ``)" oG2antt:FilterBarPromptVisible := 2055/*exFilterBarCompact+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/ oG2antt:FilterBarPromptType := 257/*exFilterPromptCaseSensitive+exFilterPromptContainsAll*/ oG2antt:FilterBarPromptPattern := "12" oG2antt:SetProperty("FilterBarBackColor",oG2antt:BackColor()) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2240 |
Is it possible to display the count of filtered items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:DrawGridLines := 2/*exVLines*/ oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderHeight := 24 oG2antt:Columns():Add("Col 1") oG2antt:Columns():Add("Col 2") oItems := oG2antt:Items() oItems:SetProperty("CellValue",oItems:AddItem("219 Smith"),1,"Ignacio 1234") oItems:SetProperty("CellValue",oItems:AddItem("1666 County Road 309A"),1,"897 Manassa") oItems:SetProperty("CellValue",oItems:AddItem("38 Lone Pine"),1,"Durango 11") oItems:SetProperty("CellValue",oItems:AddItem("612 Jachim Street"),1,"Lamar 222") oG2antt:FilterBarCaption := "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)" oG2antt:FilterBarPromptVisible := 2055/*exFilterBarCompact+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/ oG2antt:FilterBarPromptType := 257/*exFilterPromptCaseSensitive+exFilterPromptContainsAll*/ oG2antt:FilterBarPromptPattern := "12" oG2antt:SetProperty("FilterBarBackColor",oG2antt:BackColor()) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2239 |
ADOR, MDB (JET)
PROCEDURE OnAddItem(oG2antt,Item) LOCAL oItems oItems := oG2antt:Items() oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL rs oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/ oG2antt:BeginUpdate() oG2antt:ColumnAutoResize := .F. rs := CreateObject("ADOR.Recordset") rs:Open("Orders","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2antt:DataSource := rs oChart := oG2antt:Chart() oChart:FirstVisibleDate := "08/04/1994" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,256) oG2antt:Items():AllowCellValueToItemBar := .T. oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1) oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2238 |
exOverlaidBarsOffset + exOverlaidBarTransparent + exBarCanMoveToAnother
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:DefaultItemHeight := 22 oG2antt:DrawGridLines := -2/*exRowLines*/ oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/ oG2antt:Columns():Add("Task") oChart := oG2antt:Chart() oChart:DrawGridLines := -2/*exRowLines*/ oChart:GridLineStyle := 512/*exGridLinesGeometric*/ oChart:ResizeUnitScale := 65536/*exHour*/ oChart:SetProperty("PaneWidth",.F.,48) oChart:FirstVisibleDate := "01/01/2001" oBar := oChart:Bars:Item("Task") oBar:OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/ oBar:SetProperty("Overlaid",256/*exOverlaidBarsTransparent*/,70) oBar:SetProperty("Def",28/*exBarCanMoveToAnother*/,.T.) oG2antt:ItemsAllowSizing := -1/*exResizeItem*/ oItems := oG2antt:Items() oItems:SetProperty("SelectableItem",oItems:AddItem(),.F.) h := oItems:AddItem("Task 1") oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1") oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2") oItems:AddBar(h,"Task","01/04/2001","01/07/2001","A3") oItems:SetProperty("ItemHeight",h,64) h := oItems:AddItem("Task 2") oItems:AddBar(h,"Task","01/07/2001","01/10/2001","A4") oItems:AddBar(h,"Task","01/08/2001","01/12/2001","A5") oItems:SetProperty("SelectableItem",oItems:AddItem(),.F.) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2237 |
Editors (ImageSize = 32)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oAppearance LOCAL oComboBox LOCAL oEditor,oEditor1,oEditor10,oEditor11,oEditor12,oEditor2,oEditor3,oEditor4,oEditor5,oEditor6,oEditor7,oEditor8,oEditor9 LOCAL oItems LOCAL h LOCAL rs oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ImageSize := 32 oG2antt:DefaultItemHeight := 36 oG2antt:HeaderHeight := oG2antt:DefaultItemHeight() oG2antt:SortBarHeight := oG2antt:DefaultItemHeight() oG2antt:Font():Size := 16 oG2antt:FilterBarFont():Size := oG2antt:Font():Size() oG2antt:ToolTipFont():Size := oG2antt:Font():Size() oG2antt:Indent := 26 oG2antt:Images("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqNUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlwyV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+CMPo9MBMC+j2vC8j7wS8cFNI4kBo05UIvfCT/NsnsApU+0Fqg/T+oy/kPxC0sEQfErKQK96+w28UWRI8UGvO8sTLS9r2PWmsMJTDTask3CsIbIEQRA3shOXEEAO/GclJ9" +; "FEKrrA8FRbKMXRIlb0JxCkjS1LMswhCcvuel0cv26cSMa8Ufx+2sQwhEUoSXOCjSbLcnxjKc7sdKUVyq28NtVI71P9P7JxtQEapjQ6fzfM8zPfNE2PhIsLL63E40slk5y7N89LcyU9SvMb3SdUc6VJLj5VLVLfO/PS9KzNFHUa/0XyBD0dxlS9cxhMlTRSoNXypPErWDPyfNS+MwprRNO0FD8wVVZ1AI08URwVRjtJ1WCn21QkkUrXVLVPQS/XIkFgTxT9iONZ9xVTdq+L1eKg3kkF6Upe68XtfV51/MtrVjBlwYFL1ev8y1/P6/lyzzYl02wntj0RVFmS1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KjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" +; "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==") oG2antt:SetProperty("BackColorHeader",0x4c6c6c6) oG2antt:SetProperty("SelBackColor",0x4000000) oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,1 } ) , .F. )) oG2antt:ShowFocusRect := .F. oG2antt:SetProperty("CheckImage",0/*Unchecked*/,16777216) oG2antt:SetProperty("CheckImage",1/*Checked*/,33554432) oG2antt:SetProperty("CheckImage",2/*PartialChecked*/,50331648) oG2antt:Columns():Add("Editors"):SetProperty("Def",17/*exCellValueFormat*/,1) oItems := oG2antt:Items() oItems:CellEditor(oItems:AddItem("(ReadOnly)"),0):EditType := 0/*ReadOnly*/ oItems:CellEditor(oItems:AddItem("(EditType)"),0):EditType := 1/*EditType*/ h := oItems:AddItem("Value 1") oEditor := oItems:CellEditor(h,0) oEditor:EditType := 2/*DropDownType*/ oEditor:AddItem(1,"Value 1",1) oEditor:AddItem(2,"Value 2",2) oEditor:AddItem(3,"Value 3",3) oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownType)'") h := oItems:AddItem(1) oEditor1 := oItems:CellEditor(h,0) oEditor1:EditType := 3/*DropDownListType*/ oEditor1:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor1:AddItem(1,"Nancy Davolio",1) oEditor1:AddItem(2,"Andrew Fuller",2) oEditor1:AddItem(3,"Janet Leverling",3) oEditor1:AddItem(4,"Peacock Margaret",3) oEditor1:AddItem(5,"Steven Buchanan",2) oEditor1:AddItem(6,"Michael Suyama",1) oEditor1:AddItem(7,"Robert King",2) oEditor1:AddItem(8,"Laura Callahan",3) oEditor1:AddItem(9,"Anne Dodsworth",2) oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownList - single column list)'") h := oItems:AddItem(1) oEditor2 := oItems:CellEditor(h,0) oEditor2:EditType := 3/*DropDownListType*/ oEditor2:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor2:AddItem(1,"Nancy Davolio",1) oEditor2:AddItem(2,"Andrew Fuller",2) oEditor2:InsertItem(3,"Janet Leverling",3,2) oEditor2:InsertItem(4,"Peacock Margaret",3,2) oEditor2:InsertItem(5,"Steven Buchanan",2,2) oEditor2:InsertItem(6,"Michael Suyama",1,5) oEditor2:InsertItem(7,"Robert King",2,2) oEditor2:InsertItem(8,"Laura Callahan",3,2) oEditor2:InsertItem(9,"Anne Dodsworth",2,5) oEditor2:ExpandAll() oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownList - single column tree)'") h := oItems:AddItem(1) oEditor3 := oItems:CellEditor(h,0) oEditor3:EditType := 3/*DropDownListType*/ oEditor3:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor3:SetProperty("Option",57/*exDropDownColumnCaption*/,"Name¦Title¦City¦Phone") oEditor3:SetProperty("Option",58/*exDropDownColumnWidth*/,"312¦¦¦96") oEditor3:AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1) oEditor3:AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2) oEditor3:AddItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3) oEditor3:AddItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3) oEditor3:AddItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2) oEditor3:AddItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1) oEditor3:AddItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2) oEditor3:AddItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3) oEditor3:AddItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2) oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownList - multiple columns list)'") h := oItems:AddItem(1) oEditor4 := oItems:CellEditor(h,0) oEditor4:EditType := 3/*DropDownListType*/ oEditor4:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor4:SetProperty("Option",57/*exDropDownColumnCaption*/,"Name¦Title¦City¦Phone") oEditor4:SetProperty("Option",58/*exDropDownColumnWidth*/,"312¦¦¦96") oEditor4:AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1) oEditor4:AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2) oEditor4:InsertItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3,2) oEditor4:InsertItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3,2) oEditor4:InsertItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2,2) oEditor4:InsertItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1,5) oEditor4:InsertItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2,2) oEditor4:InsertItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3,2) oEditor4:InsertItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2,5) oEditor4:ExpandAll() oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownList - multiple columns tree)'") h := oItems:AddItem(100) oItems:CellEditor(h,0):EditType := 4/*SpinType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (SpinType)'") oItems:CellEditor(oItems:AddItem("(MemoType)"),0):EditType := 5/*MemoType*/ h := oItems:AddItem(3) oEditor5 := oItems:CellEditor(h,0) oEditor5:EditType := 6/*CheckListType*/ oEditor5:AddItem(1,"Border",1) oEditor5:AddItem(2,"Single",2) oEditor5:AddItem(4,"Frame",3) oItems:SetProperty("FormatCell",h,0,"value + ' (CheckListType)'") h := oItems:AddItem("193.226.40.161") oEditor6 := oItems:CellEditor(h,0) oEditor6:Mask := "{0,255}.{0,255}.{0,255}.{0,255}" oEditor6:EditType := 8/*MaskType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (MaskType)'") h := oItems:AddItem(65280) oEditor7 := oItems:CellEditor(h,0) oEditor7:EditType := 9/*ColorType*/ oEditor7:Mask := "`RGB(`{0,255}\,{0,255}\,{0,255}`)`;;0" oItems:SetProperty("FormatCell",h,0,"value + ' (ColorType)'") h := oItems:AddItem("Tahoma") oItems:CellEditor(h,0):EditType := 10/*FontType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (FontType)'") h := oItems:AddItem("gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWamYyIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDAwBUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQ" +; "G4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYABGQZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyCAAjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATFASoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CA" +; "JDQNg/p4AAdoC") oItems:CellEditor(h,0):EditType := 11/*PictureType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (PictureType)'") oItems:CellEditor(oItems:AddItem("(ButtonType)"),0):EditType := 12/*ButtonType*/ h := oItems:AddItem(25) oItems:CellEditor(h,0):EditType := 13/*ProgressBarType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (ProgressBarType)'") h := oItems:AddItem("Value 1") oEditor8 := oItems:CellEditor(h,0) oEditor8:EditType := 14/*PickEditType*/ oEditor8:AddItem(1,"Value 1",1) oEditor8:AddItem(2,"Value 2",2) oEditor8:AddItem(3,"Value 3",3) oItems:SetProperty("FormatCell",h,0,"value + ' (PickEditType)'") oItems:CellEditor(oItems:AddItem("(LinkEditType)"),0):EditType := 15/*LinkEditType*/ oEditor9 := oItems:CellEditor(oItems:AddItem("(UserEditorType)"),0) oEditor9:EditType := 16/*UserEditorType*/ oEditor9:UserEditor("Exontrol.ComboBox","") oComboBox := oEditor9:UserEditorObject() oComboBox:BeginUpdate() oComboBox:LabelHeight := oG2antt:DefaultItemHeight() oComboBox:Style := 2/*DropDownList*/ oComboBox:ColumnAutoResize := .F. rs := CreateObject("ADOR.Recordset") rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oComboBox:DataSource := rs oComboBox:MinHeightList := 128 oComboBox:SearchColumnIndex := 0 oComboBox:UseTabKey := .F. oComboBox:EndUpdate() h := oItems:AddItem(255) oEditor10 := oItems:CellEditor(h,0) oEditor10:EditType := 17/*ColorListType*/ oEditor10:SetProperty("Option",4/*exColorListShowName*/,.T.) oItems:SetProperty("FormatCell",h,0,"value + ' (ColorListType)'") oItems:CellEditor(oItems:AddItem(65280),0):EditType := 17/*ColorListType*/ oItems:CellEditor(oItems:AddItem("(MemoDropDownType)"),0):EditType := 18/*MemoDropDownType*/ oEditor11 := oItems:CellEditor(oItems:AddItem(-1),0) oEditor11:EditType := 19/*CheckValueType*/ oEditor11:SetProperty("Option",17/*exCheckValue2*/,1) h := oItems:AddItem(50) oEditor12 := oItems:CellEditor(h,0) oEditor12:EditType := 20/*SliderType*/ oEditor12:SetProperty("Option",41/*exSliderWidth*/,-60) oEditor12:SetProperty("Option",53/*exSliderTickFrequency*/,10) oEditor12:SetProperty("Option",63/*exSliderTickStyle*/,2) oItems:SetProperty("FormatCell",h,0,"value + ' (SliderType)'") h := oItems:AddItem(100) oItems:CellEditor(h,0):EditType := 21/*CalculatorType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (CalculatorType)'") oItems:EnsureVisibleItem(h) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2236 |
Editors (ImageSize = 16, default)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oAppearance LOCAL oComboBox LOCAL oEditor,oEditor1,oEditor10,oEditor11,oEditor12,oEditor2,oEditor3,oEditor4,oEditor5,oEditor6,oEditor7,oEditor8,oEditor9 LOCAL oItems LOCAL h LOCAL rs oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ImageSize := 16 oG2antt:Images("gBJJgBAIDAAEg4ACEKAD/hz/EMNh8TIRNGwAjEZAEXjAojJAjMLjABAAgjUYkUnlUrlktl0vmExmUzmk1m03nE5nU7nkrQCAntBoVDolFo1HoM/ADAplLptImdMYFOqdSqlXq1QrVbrlGpVWsFNrNdnNjsk7pQAtNroFnt0sh8Yr9iulTuNxs1Eu8OiT/vsnsNVutXlk/oGGtVKxGLxWNtsZtN8iUYuNvy0Zvd+xNYwdwvl4p870GCqc8vOeuVttmp1knyOayWVy+WzN/ze1wOElenm+12WUz/Bv2/3UyyWrzeutux2GSyGP2dQ33C1ur3GD3M4zUNzHdlWjq/E3nGzVpjWv4HA7fRy/Tv2IrN8rPW6nZ3ve7mUlfu20Z8acvQyb+vY9jasYoDwMm+LytVBDqKG3z8O3Cb8P+mkAuY9cCQ2uL4KaxDKvkp8RNLEjqugnrwQo/UWPzFyeQw5sNLZFENrI4kOqU66pw8uzmOKvTqNqjULJvGL1JO48GtT" +; "GsbLdEL3scxLlyiw8dQeoUVxdLTtyKmUjwGlslRPJsnK1HbAKbKCrsQo8uQk/CeP44iaR/ATnTNPLvyxPU+z9P9AUDQVBowiofJXQ6Oo+kKMpIkjztE4TKn4P6JowfgPnwD5/nAjB8AOeAPo0eAA1IAFH07UhAIMpYAVIYFHqBUhwVjV1S1EtQAHxW65V0AZwAeuQAnwB5gAPYViEDVhwAHTQBkCjB4gOhwDmCyhH0sACAg==") oAppearance := oG2antt:VisualAppearance() oAppearance:Add(4,"gBFLBCJwBAEHhEJAAEhABUYCg6AADACAxRDgMQBQKAAzQF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:Columns():Add("Editors"):SetProperty("Def",17/*exCellValueFormat*/,1) oItems := oG2antt:Items() oItems:CellEditor(oItems:AddItem("(ReadOnly)"),0):EditType := 0/*ReadOnly*/ oItems:CellEditor(oItems:AddItem("(EditType)"),0):EditType := 1/*EditType*/ h := oItems:AddItem("Value 1") oEditor := oItems:CellEditor(h,0) oEditor:EditType := 2/*DropDownType*/ oEditor:AddItem(1,"Value 1",1) oEditor:AddItem(2,"Value 2",2) oEditor:AddItem(3,"Value 3",3) oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownType)'") h := oItems:AddItem(1) oEditor1 := oItems:CellEditor(h,0) oEditor1:EditType := 3/*DropDownListType*/ oEditor1:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor1:AddItem(1,"Nancy Davolio",1) oEditor1:AddItem(2,"Andrew Fuller",2) oEditor1:AddItem(3,"Janet Leverling",3) oEditor1:AddItem(4,"Peacock Margaret",3) oEditor1:AddItem(5,"Steven Buchanan",2) oEditor1:AddItem(6,"Michael Suyama",1) oEditor1:AddItem(7,"Robert King",2) oEditor1:AddItem(8,"Laura Callahan",3) oEditor1:AddItem(9,"Anne Dodsworth",2) oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownList - single column list)'") h := oItems:AddItem(1) oEditor2 := oItems:CellEditor(h,0) oEditor2:EditType := 3/*DropDownListType*/ oEditor2:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor2:AddItem(1,"Nancy Davolio",1) oEditor2:AddItem(2,"Andrew Fuller",2) oEditor2:InsertItem(3,"Janet Leverling",3,2) oEditor2:InsertItem(4,"Peacock Margaret",3,2) oEditor2:InsertItem(5,"Steven Buchanan",2,2) oEditor2:InsertItem(6,"Michael Suyama",1,5) oEditor2:InsertItem(7,"Robert King",2,2) oEditor2:InsertItem(8,"Laura Callahan",3,2) oEditor2:InsertItem(9,"Anne Dodsworth",2,5) oEditor2:ExpandAll() oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownList - single column tree)'") h := oItems:AddItem(1) oEditor3 := oItems:CellEditor(h,0) oEditor3:EditType := 3/*DropDownListType*/ oEditor3:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor3:SetProperty("Option",57/*exDropDownColumnCaption*/,"Name¦Title¦City¦Phone") oEditor3:SetProperty("Option",58/*exDropDownColumnWidth*/,"312¦¦¦96") oEditor3:AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1) oEditor3:AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2) oEditor3:AddItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3) oEditor3:AddItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3) oEditor3:AddItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2) oEditor3:AddItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1) oEditor3:AddItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2) oEditor3:AddItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3) oEditor3:AddItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2) oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownList - multiple columns list)'") h := oItems:AddItem(1) oEditor4 := oItems:CellEditor(h,0) oEditor4:EditType := 3/*DropDownListType*/ oEditor4:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor4:SetProperty("Option",57/*exDropDownColumnCaption*/,"Name¦Title¦City¦Phone") oEditor4:SetProperty("Option",58/*exDropDownColumnWidth*/,"312¦¦¦96") oEditor4:AddItem(1,"Nancy Davolio¦Sales Representative¦Seattle¦(206) 555-9857",1) oEditor4:AddItem(2,"Andrew Fuller¦<b>Vice President</b>, Sales¦Tacoma¦(206) 555-9482",2) oEditor4:InsertItem(3,"Janet Leverling¦Sales Representative¦Kirkland¦(206) 555-3412",3,2) oEditor4:InsertItem(4,"Peacock Margaret¦Sales Representative¦Redmond¦(206) 555-8122",3,2) oEditor4:InsertItem(5,"Steven Buchanan¦Sales Manager¦London¦(71) 555-4848",2,2) oEditor4:InsertItem(6,"Michael Suyama¦Sales Representative¦London¦(71) 555-7773",1,5) oEditor4:InsertItem(7,"Robert King¦Sales Representative¦Kirkland¦(71) 555-5598",2,2) oEditor4:InsertItem(8,"Laura Callahan¦Inside Sales Coordinator¦Seattle¦(206) 555-1189",3,2) oEditor4:InsertItem(9,"Anne Dodsworth¦Sales Representative¦London¦(71) 555-4444",2,5) oEditor4:ExpandAll() oItems:SetProperty("FormatCell",h,0,"value + ' (DropDownList - multiple columns tree)'") h := oItems:AddItem(100) oItems:CellEditor(h,0):EditType := 4/*SpinType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (SpinType)'") oItems:CellEditor(oItems:AddItem("(MemoType)"),0):EditType := 5/*MemoType*/ h := oItems:AddItem(3) oEditor5 := oItems:CellEditor(h,0) oEditor5:EditType := 6/*CheckListType*/ oEditor5:AddItem(1,"Border",1) oEditor5:AddItem(2,"Single",2) oEditor5:AddItem(4,"Frame",3) oItems:SetProperty("FormatCell",h,0,"value + ' (CheckListType)'") h := oItems:AddItem("193.226.40.161") oEditor6 := oItems:CellEditor(h,0) oEditor6:Mask := "{0,255}.{0,255}.{0,255}.{0,255}" oEditor6:EditType := 8/*MaskType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (MaskType)'") h := oItems:AddItem(65280) oEditor7 := oItems:CellEditor(h,0) oEditor7:EditType := 9/*ColorType*/ oEditor7:Mask := "`RGB(`{0,255}\,{0,255}\,{0,255}`)`;;0" oItems:SetProperty("FormatCell",h,0,"value + ' (ColorType)'") h := oItems:AddItem("Tahoma") oItems:CellEditor(h,0):EditType := 10/*FontType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (FontType)'") h := oItems:AddItem("gBHJJGHA5MIwAEIe4AAAFhwbiAliQwig7ixFjBQjRbjhljxwkB7kSFkiQkyblCllSwli7lzFmDQmTbmjlmzwnD7nQBnk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1YhgAEL5AgBhj/AAssMJthABFof4JDhIWCgYKDBATFT8M6hUIFAQAEQCCDwYF/QoWDZCRBgOKgIYHCQXMisKBAEQAAgOBZaSgQhjERANKQiZhIWamYyIBQ6FzcNKxQLJT4ADA4RjwObAAidBYdHwABQgUxMQYZEI0cD4OgnYKaKyzIRFNQx2YCKoFHScYD0ADXQwUAgwLoLQDqaCWBJoNQ9NBxFJTVQORgiarqSABbamGwtDAwBUWhQmqYALnOFQvGYPA4m6AwKhkZxKj2PBWC0SZCgmVY6CwIJgieBAniubRKHgaYgiwQwGiCfxGDWbBRmGZYIi2VwGnAexxGUSwUFiaR+hQPbBgOCoLCIHh4DAARCmQ" +; "G4AlgNxuhwWgpFAEQUhuOxOk0NrhAaQoBmgPYdFSIZPjYGYbn+HhgEoAA7HMBIOjUM51AoPojHkEwVlET5slgWZtAEUBdjeSoeF6X5/rQRRSi+QB6GychsEAfZshKYABGQZorlAOgMBqEgAjYHB2jqSoigmYBLk+QZnBqGhggAEwImgbojgoIwSE+MxUHiS4REQCQWluD48B+JJoL+YQikuaI9AALgLmsJQfnSdAvDkCJEhIIIBgOegLEiPBqCyCAAjcCwgAAIJBhQBQkHGL4gDaNBokkZQMiwUAuioJQiCAQYsHMcwwEIeoigAYIogsGIwFKIYICIWguEoPgQhsawBASGgwCuJwLH8K4LigAIaDwbxMAOKxbisPwfASQATFASoagIEYwgcSoKGiAA/mEdIuiGPxCmObIlhMIJNHONxFH8EpPCGeB+noEpBBSSRjCsPZEiyKhgjAH5whSdLEjwDxjC8TxVEMFRzFWJJZBUSI0gQEQLBOM4VHkIg1D0CA" +; "JDQNg/p4AAdoC") oItems:CellEditor(h,0):EditType := 11/*PictureType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (PictureType)'") oItems:CellEditor(oItems:AddItem("(ButtonType)"),0):EditType := 12/*ButtonType*/ h := oItems:AddItem(25) oItems:CellEditor(h,0):EditType := 13/*ProgressBarType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (ProgressBarType)'") h := oItems:AddItem("Value 1") oEditor8 := oItems:CellEditor(h,0) oEditor8:EditType := 14/*PickEditType*/ oEditor8:AddItem(1,"Value 1",1) oEditor8:AddItem(2,"Value 2",2) oEditor8:AddItem(3,"Value 3",3) oItems:SetProperty("FormatCell",h,0,"value + ' (PickEditType)'") oItems:CellEditor(oItems:AddItem("(LinkEditType)"),0):EditType := 15/*LinkEditType*/ oEditor9 := oItems:CellEditor(oItems:AddItem("(UserEditorType)"),0) oEditor9:EditType := 16/*UserEditorType*/ oEditor9:UserEditor("Exontrol.ComboBox","") oComboBox := oEditor9:UserEditorObject() oComboBox:BeginUpdate() oComboBox:LabelHeight := oG2antt:DefaultItemHeight() oComboBox:Style := 2/*DropDownList*/ oComboBox:ColumnAutoResize := .F. rs := CreateObject("ADOR.Recordset") rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oComboBox:DataSource := rs oComboBox:MinHeightList := 128 oComboBox:SearchColumnIndex := 0 oComboBox:UseTabKey := .F. oComboBox:EndUpdate() h := oItems:AddItem(255) oEditor10 := oItems:CellEditor(h,0) oEditor10:EditType := 17/*ColorListType*/ oEditor10:SetProperty("Option",4/*exColorListShowName*/,.T.) oItems:SetProperty("FormatCell",h,0,"value + ' (ColorListType)'") oItems:CellEditor(oItems:AddItem(65280),0):EditType := 17/*ColorListType*/ oItems:CellEditor(oItems:AddItem("(MemoDropDownType)"),0):EditType := 18/*MemoDropDownType*/ oEditor11 := oItems:CellEditor(oItems:AddItem(-1),0) oEditor11:EditType := 19/*CheckValueType*/ oEditor11:SetProperty("Option",17/*exCheckValue2*/,1) h := oItems:AddItem(50) oEditor12 := oItems:CellEditor(h,0) oEditor12:EditType := 20/*SliderType*/ oEditor12:SetProperty("Option",41/*exSliderWidth*/,-60) oEditor12:SetProperty("Option",53/*exSliderTickFrequency*/,10) oEditor12:SetProperty("Option",63/*exSliderTickStyle*/,2) oItems:SetProperty("FormatCell",h,0,"value + ' (SliderType)'") h := oItems:AddItem(100) oItems:CellEditor(h,0):EditType := 21/*CalculatorType*/ oItems:SetProperty("FormatCell",h,0,"value + ' (CalculatorType)'") oItems:EnsureVisibleItem(h) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2235 |
Is it possible to limit the overlaid to two rows only
|
2234 |
Is it possible to sort the bars
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oColumn LOCAL oItems LOCAL h1,h2,h3,h4,h5 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:AntiAliasing := .T. oG2antt:Columns():Add("Task"):AllowSort := .F. oColumn := oG2antt:Columns():Add("Name") oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,0) oColumn:SortType := 0/*SortString*/ oColumn:Visible := .F. oChart := oG2antt:Chart() oChart:FirstVisibleDate := "12/31/2000" oChart:SetProperty("PaneWidth",.F.,48) oChart:LevelCount := 2 oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/ oChart:Bars():CallMethod("Copy","Task","Red"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oChart:NonworkingDaysPattern := 6/*exPatternBDiagonal*/ oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor ( { 224,224,224 } ) , .F. )) oChart:LinksStyle := 0/*exLinkSolid*/ oItems := oG2antt:Items() oItems:AllowCellValueToItemBar := .T. h1 := oItems:AddItem("Task 1") oItems:AddBar(h1,"Task","01/02/2001","01/04/2001") h2 := oItems:AddItem("Task 2") oItems:AddBar(h2,"Red","01/02/2001","01/05/2001") h3 := oItems:AddItem("Task 3") oItems:AddBar(h3,"Task","01/02/2001","01/05/2001") h4 := oItems:AddItem("Task 4") oItems:AddBar(h4,"Red","01/02/2001","01/05/2001") h5 := oItems:AddItem("Task 5") oItems:AddBar(h5,"Red","01/02/2001","01/05/2001") oItems:AddLink("L1",h1,"",h3,"") oItems:AddLink("L2",h2,"",h4,"") oItems:AddLink("L3",h3,"",h4,"") oItems:AddLink("L4",h4,"",h5,"") oItems:SchedulePDM(0,"") oG2antt:Chart():ShowLinks := 1/*exShowExtendedLinks*/ oG2antt:Columns:Item("Name"):SortOrder := 1/*SortAscending*/ oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2233 |
Re-order the cell's caption, icons and images/pictures
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn,oColumn1 LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Images("gBJJgBAICAADAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEahkZAIAEEbjMjlErlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrlTiFdib/sNjr9gs1nldlrlqtFtt0stlguNvulyh91ud1vVVvNuvt7wFHr9/vl3luEwOJouIq+Dw2KyGRyWTymVy2XzGZzUuiw+lmej0gkUaksljaAnmDcD/cEbf7w1+ufD/fEbeB028bYAO3enB6AB++4EoA4A4sb4vHjXJ4nG5vKAHA4ca6XBjTAD/Y2x/eB/jcB") oColumn := oG2antt:Columns():Add("ToLeft") oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.) oColumn1 := oG2antt:Columns():Add("ToRight") oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.) oColumn1:SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,picture,icons,icon,check") oG2antt:DefaultItemHeight := 32 oG2antt:DrawGridLines := 2/*exVLines*/ oG2antt:HeaderAppearance := 4/*Etched*/ oItems := oG2antt:Items() h := oItems:AddItem("Caption") oItems:SetProperty("CellImage",h,0,2) oItems:SetProperty("CellImages",h,0,"1,2") oItems:SetProperty("CellPicture",h,0,oG2antt:ExecuteTemplate("loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgKByN5mNJsMsKPABVqXBI4KjrD7HL6GWKPJKiCIhMiySidKxbOzZZJWMLsGL2FqyLjZMonNa2CyiZDOUqsQqUEq0ZCNISFXDIFxzZ4hUrbdrefZ/fz3ZgzZ75Tz3XjvHZnZznPieb55AKgAqmRyOOzEhR7XirWaWQQMTa+QIhDbZOZAAoYUCPDAQG7FXI4JRrNCoIRdPyyFr0AYifDUKZ+PCufK4RReALLUbtdBHSrGTCCNKqT4MbRqUxxQx+CAAEQ2VCBbxqGaLYDZNgzFbCbLDarRCrqMYMM6cWq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BiaHtJT3LEfgCLYIgQNYgw4IQiSaBcAABBEAB/DAXS4HgPAgLUSCzGkPjkIATyXPQoCeNYfR6Do7QGI8Zj+CAHiyCY2SkIQTSSCIyDQCkpDBJQJinMMuAUPgOxGOcpA/AkoTzJwyiYFMiDwJEsShFAURFCwJRVFceQXKQIS8P8STlBgLggAcrAQCQATjIgZA0JgVSxL0OAmKI6CpEc4SuOkeBeOwMRnLQuQhOApDJAImYmD44BPIgAzFMYiR3LcQw4JwqhQAknAMFAxwEEwJwUO4ljCHgmxzNwNQ3EU3ScLYEAACocDePwZgCLI+yFN8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj" +; "5Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==`)")) oItems:SetProperty("CellValue",h,1,oItems:CellValue(h,0)) oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/) oItems:SetProperty("CellImage",h,1,oItems:CellImage(h,0)) oItems:SetProperty("CellImages",h,1,"2,1") oItems:SetProperty("CellPicture",h,1,oItems:CellPicture(h,0)) h := oItems:AddItem("<b>HTML</b> <off 4>Caption") oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/) oItems:SetProperty("CellImage",h,0,2) oItems:SetProperty("CellImages",h,0,"1,2") oItems:SetProperty("CellPicture",h,0,oG2antt:ExecuteTemplate("loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgKByN5mNJsMsKPABVqXBI4KjrD7HL6GWKPJKiCIhMiySidKxbOzZZJWMLsGL2FqyLjZMonNa2CyiZDOUqsQqUEq0ZCNISFXDIFxzZ4hUrbdrefZ/fz3ZgzZ75Tz3XjvHZnZznPieb55AKgAqmRyOOzEhR7XirWaWQQMTa+QIhDbZOZAAoYUCPDAQG7FXI4JRrNCoIRdPyyFr0AYifDUKZ+PCufK4RReALLUbtdBHSrGTCCNKqT4MbRqUxxQx+CAAEQ2VCBbxqGaLYDZNgzFbC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M+CZJ0HAaoQHQYocBiaHtJT3LEfgCLYIgQNYgw4IQiSaBcAABBEAB/DAXS4HgPAgLUSCzGkPjkIATyXPQoCeNYfR6Do7QGI8Zj+CAHiyCY2SkIQTSSCIyDQCkpDBJQJinMMuAUPgOxGOcpA/AkoTzJwyiYFMiDwJEsShFAURFCwJRVFceQXKQIS8P8STlBgLggAcrAQCQATjIgZA0JgVSxL0OAmKI6CpEc4SuOkeBeOwMRnLQuQhOApDJAImYmD44BPIgAzFMYiR3LcQw4JwqhQAknAMFAxwEEwJwUO4ljCHgmxzNwNQ3EU3ScLYEAACocDePwZgCLI+yFN8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj" +; "5Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==`)")) oItems:SetProperty("CellValue",h,1,oItems:CellValue(h,0)) oItems:SetProperty("CellValueFormat",h,1,1/*exHTML*/) oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/) oItems:SetProperty("CellImage",h,1,oItems:CellImage(h,0)) oItems:SetProperty("CellImages",h,1,"2,1") oItems:SetProperty("CellPicture",h,1,oItems:CellPicture(h,0)) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2232 |
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)
PROCEDURE OnAddColumn(oG2antt,Column) /*Column.Def(48) = 2*/ /*Column.Def(49) = 2*/ RETURN PROCEDURE OnAddItem(oG2antt,Item) oG2antt:Items():AddBar(Item,"Task","01/02/2022","01/08/2022",,"<img>1</img>") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oAppearance LOCAL oChart LOCAL oColumn,oColumn1,oColumn2,oColumn3 LOCAL oItems LOCAL h,hR oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:AddColumn := {|Column| OnAddColumn(oG2antt,Column)} /*Fired after a new column has been added.*/ oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/ oG2antt:BeginUpdate() oG2antt:ImageSize := 32 oG2antt:DefaultItemHeight := 36 oG2antt:HeaderHeight := oG2antt:DefaultItemHeight() oG2antt:SortBarHeight := oG2antt:DefaultItemHeight() oG2antt:Font():Size := 16 oG2antt:FilterBarFont():Size := oG2antt:Font():Size() oG2antt:ToolTipFont():Size := oG2antt:Font():Size() oG2antt:Indent := 26 oChart := oG2antt:Chart() oChart:FirstVisibleDate := "01/01/2022" oChart:Bars:Item("Task"):Height := 22 oG2antt:Images("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqNUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlwyV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+CMPo9MBMC+j2vC8j7wS8cFNI4kBo05UIvfCT/NsnsApU+0Fqg/T+oy/kPxC0sEQfErKQK96+w28UWRI8UGvO8sTLS9r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Ds" +; "YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" +; "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==") oG2antt:SetProperty("BackColorHeader",0x4c6c6c6) oG2antt:SetProperty("SelBackColor",0x4000000) oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,1 } ) , .F. )) oG2antt:SetProperty("CheckImage",0/*Unchecked*/,16777216) oG2antt:SetProperty("CheckImage",1/*Checked*/,33554432) oG2antt:SetProperty("CheckImage",2/*PartialChecked*/,50331648) oG2antt:SetProperty("Background",20/*exSelBackColorFilter*/,oG2antt:SelBackColor()) oG2antt:SetProperty("Background",21/*exSelForeColorFilter*/,oG2antt:SelForeColor()) oG2antt:SetProperty("Background",26/*exBackColorFilter*/,oG2antt:BackColor()) oG2antt:SetProperty("Background",27/*exForeColorFilter*/,oG2antt:ForeColor()) oG2antt:SetProperty("Background",32/*exCursorHoverColumn*/,-1) oG2antt:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x4000000) oG2antt:SetProperty("Background",41/*exHeaderFilterBarActive*/,0x4010101) oG2antt:SetProperty("Background",1/*exFooterFilterBarButton*/,0x40000ff) oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:ShowFocusRect := .F. oG2antt:SortBarVisible := .T. oG2antt:AllowGroupBy := .T. oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor()) oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor()) oG2antt:FilterBarDropDownHeight := 1 oColumn := oG2antt:Columns():Add("Check") oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.) oColumn:PartialCheck := .T. oColumn:Width := 128 oColumn:DisplayFilterButton := .T. oColumn:FilterList := 256/*exShowCheckBox*/ oColumn1 := oG2antt:Columns():Add("Pos") oColumn1:FormatColumn := "1 pos ``" oColumn1:AllowSort := .F. oColumn1:Width := 48 oColumn1:AllowSizing := .F. oColumn1:Alignment := 1/*CenterAlignment*/ oColumn1:HeaderAlignment := 1/*CenterAlignment*/ oColumn2 := oG2antt:Columns():Add("Image") oColumn2:DisplayFilterButton := .T. oColumn2:FilterList := 8480/*exShowExclude+exShowCheckBox+exSortItemsAsc*/ oColumn2:FilterType := 10/*exImage*/ oColumn2:DisplayExpandButton := .T. oColumn2:ExpandColumns := "1,2,3" oColumn2:Width := 128 oColumn2:HeaderImage := 1 oColumn3 := oG2antt:Columns():Add("Images") oColumn3:SetProperty("Def",0/*exCellHasCheckBox*/,.T.) oColumn3:Width := 196 oColumn3:HTMLCaption := "<img>1</img><img>2</img><img>3</img> Images" oG2antt:Columns:Item("Pos"):Position := 3 oItems := oG2antt:Items() hR := oItems:AddItem("Root") oItems:SetProperty("ItemDivider",hR,0) oItems:SetProperty("ItemDividerLine",hR,0/*EmptyLine*/) h := oItems:InsertItem(hR,,"Child A") oItems:SetProperty("CellImage",h,2,1) oItems:SetProperty("CellImages",h,3,"1,2,3") oItems:SetProperty("CellValue",h,3,"123") h := oItems:InsertItem(hR,,"Child B") oItems:SetProperty("CellState",h,0,1) oItems:SetProperty("CellImage",h,2,3) oItems:SetProperty("CellImages",h,3,"2,3,1") oItems:SetProperty("CellValue",h,3,"231") oItems:SetProperty("SelectItem",h,.T.) h := oItems:InsertItem(hR,,"Child C") oItems:SetProperty("CellImage",h,2,2) oItems:SetProperty("CellState",h,3,1) oItems:SetProperty("CellValue",h,3,"312") oItems:SetProperty("CellImages",h,3,"3,1,2") oItems:SetProperty("ExpandItem",hR,.T.) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2231 |
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)
PROCEDURE OnAddColumn(oG2antt,Column) /*Column.Def(48) = 2*/ /*Column.Def(49) = 2*/ RETURN PROCEDURE OnAddItem(oG2antt,Item) oG2antt:Items():AddBar(Item,"Task","01/02/2022","01/08/2022",,"<img>1</img>") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oAppearance LOCAL oColumn,oColumn1,oColumn2,oColumn3 LOCAL oItems LOCAL h,hR oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:AddColumn := {|Column| OnAddColumn(oG2antt,Column)} /*Fired after a new column has been added.*/ oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/ oG2antt:BeginUpdate() oG2antt:Chart():FirstVisibleDate := "01/01/2022" oG2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TVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" +; "YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" +; "FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==") oG2antt:SetProperty("BackColorHeader",0x4c6c6c6) oG2antt:SetProperty("SelBackColor",0x4000000) oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,1 } ) , .F. )) oG2antt:SetProperty("Background",20/*exSelBackColorFilter*/,oG2antt:SelBackColor()) oG2antt:SetProperty("Background",21/*exSelForeColorFilter*/,oG2antt:SelForeColor()) oG2antt:SetProperty("Background",26/*exBackColorFilter*/,oG2antt:BackColor()) oG2antt:SetProperty("Background",27/*exForeColorFilter*/,oG2antt:ForeColor()) oG2antt:SetProperty("Background",32/*exCursorHoverColumn*/,-1) oG2antt:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x4000000) oG2antt:SetProperty("Background",41/*exHeaderFilterBarActive*/,0x4010101) oG2antt:SetProperty("Background",1/*exFooterFilterBarButton*/,0x40000ff) oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:ShowFocusRect := .F. oG2antt:SortBarVisible := .T. oG2antt:AllowGroupBy := .T. oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor()) oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor()) oG2antt:FilterBarDropDownHeight := 1 oColumn := oG2antt:Columns():Add("Check") oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.) oColumn:PartialCheck := .T. oColumn:Width := 128 oColumn:DisplayFilterButton := .T. oColumn:FilterList := 256/*exShowCheckBox*/ oColumn1 := oG2antt:Columns():Add("Pos") oColumn1:FormatColumn := "1 pos ``" oColumn1:AllowSort := .F. oColumn1:Width := 48 oColumn1:AllowSizing := .F. oColumn1:Alignment := 1/*CenterAlignment*/ oColumn1:HeaderAlignment := 1/*CenterAlignment*/ oColumn2 := oG2antt:Columns():Add("Image") oColumn2:DisplayFilterButton := .T. oColumn2:FilterList := 8480/*exShowExclude+exShowCheckBox+exSortItemsAsc*/ oColumn2:FilterType := 10/*exImage*/ oColumn2:DisplayExpandButton := .T. oColumn2:ExpandColumns := "1,2,3" oColumn2:Width := 128 oColumn2:HeaderImage := 1 oColumn3 := oG2antt:Columns():Add("Images") oColumn3:SetProperty("Def",0/*exCellHasCheckBox*/,.T.) oColumn3:Width := 196 oColumn3:HTMLCaption := "<img>1</img><img>2</img><img>3</img> Images" oG2antt:Columns:Item("Pos"):Position := 3 oItems := oG2antt:Items() hR := oItems:AddItem("Root") oItems:SetProperty("ItemDivider",hR,0) oItems:SetProperty("ItemDividerLine",hR,0/*EmptyLine*/) h := oItems:InsertItem(hR,,"Child A") oItems:SetProperty("CellImage",h,2,1) oItems:SetProperty("CellImages",h,3,"1,2,3") oItems:SetProperty("CellValue",h,3,"123") h := oItems:InsertItem(hR,,"Child B") oItems:SetProperty("CellState",h,0,1) oItems:SetProperty("CellImage",h,2,3) oItems:SetProperty("CellImages",h,3,"2,3,1") oItems:SetProperty("CellValue",h,3,"231") oItems:SetProperty("SelectItem",h,.T.) h := oItems:InsertItem(hR,,"Child C") oItems:SetProperty("CellImage",h,2,2) oItems:SetProperty("CellState",h,3,1) oItems:SetProperty("CellValue",h,3,"312") oItems:SetProperty("CellImages",h,3,"3,1,2") oItems:SetProperty("ExpandItem",hR,.T.) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2230 |
How do I clip/hide/align the bar's caption/text based on the bar's size/width/length
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Clip") oG2antt:ScrollBySingleLine := .T. oG2antt:DrawGridLines := -2/*exRowLines*/ oChart := oG2antt:Chart() oChart:AllowResizeChart := 6/*exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oChart:DrawGridLines := -2/*exRowLines*/ oChart:FirstVisibleDate := "12/23/2000" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,216) oBar := oChart:Bars:Item("Task") oBar:Pattern := 32/*exPatternBox*/ oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor ( { 164,164,164 } ) , .F. )) oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oBar:SetProperty("EndColor",oBar:StartColor()) oBar:OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:Height := 15 oChart:MinUnitWidth := oChart:UnitWidth() oItems := oG2antt:Items() h := oItems:AddItem("no clip, (0-2)") oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1") oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"no clip, right(<b>2</b>)") oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,2) oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K2") oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"no clip, center(<b>1</b>)") oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,1) oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K3") oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"no clip, left(<b>0</b>)") oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,0) h := oItems:AddItem("clip, inside (3-5)") oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K1") oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"clip, inside, right(<b>5</b>)") oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,5) oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K2") oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"clip, inside, center(<b>4</b>)") oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,4) oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K3") oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"clip, inside, left(<b>3</b>)") oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,3) h := oItems:AddItem("hide on min width, clip if not fit, inside (6-8)") oItems:AddBar(h,"Task","12/26/2000","01/10/2001","K1") oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"hide on min width, clip if not fit, inside, right(<b>8</b>)") oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,8) oItems:AddBar(h,"Task","12/26/2000","01/10/2001","K2") oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"hide on min width, clip if not fit, inside, center(<b>7</b>)") oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,7) oItems:AddBar(h,"Task","12/26/2000","01/10/2001","K3") oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"hide on min width, clip if not fit, inside, left(<b>6</b>)") oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,6) h := oItems:AddItem("hide if not fit, no clip, inside (9-11)") oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K1") oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"hide if not fit, no clip, inside, right(<b>11</b>)") oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,11) oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K2") oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"hide if not fit, no clip, center(<b>10</b>)") oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,10) oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K3") oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"hide if not fit, no clip, inside, left(<b>9</b>)") oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,9) h := oItems:AddItem("no clip, inside, outside (12-14)") oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K1") oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"no clip, inside, outside, right(<b>14</b>)") oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,14) oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K2") oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"no clip, inside, outside, center(<b>13</b>)") oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,13) oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K3") oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"no clip, inside, outside, left(<b>12</b>)") oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,12) h := oItems:AddItem("no clip, outside (16-18)") oItems:AddBar(h,"Task","12/30/2000","01/06/2001","K1") oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"no clip, outside, right(<b>18</b>)") oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,18) oItems:AddBar(h,"Task","12/30/2000","01/06/2001","K2") oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"no clip, outside, center(<b>17</b>)") oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,17) oItems:AddBar(h,"Task","12/30/2000","01/06/2001","K3") oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"no clip, outside, left(<b>16</b>)") oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,16) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2229 |
The user clicks the drop-down filter, select a value and the control's list filters for the selected item(s). Is there a way for when the user then goes to the next column to add another filter and the drop down arrow is clicked for the list of values they can filter by to be limited to what is being displayed in the list due to the first filter they set
PROCEDURE OnAddColumn(oG2antt,Column) RETURN PROCEDURE OnAddItem(oG2antt,Item) LOCAL oItems oItems := oG2antt:Items() oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL rs oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:AddColumn := {|Column| OnAddColumn(oG2antt,Column)} /*Fired after a new column has been added.*/ oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/ oG2antt:BeginUpdate() oG2antt:ColumnAutoResize := .F. rs := CreateObject("ADOR.Recordset") rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2antt:DataSource := rs oChart := oG2antt:Chart() oChart:FirstVisibleDate := "08/04/1994" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,290) oG2antt:Items():AllowCellValueToItemBar := .T. oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1) oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2) oG2antt:Columns:Item("ShipVia"):Position := 2 oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2228 |
Does the control display images from database (DAO)
|
2227 |
Does the control display images from database (ADO)
|
2226 |
Is it possible to set from code, a column sort without being inserted in the sortbar
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL rs oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:ColumnAutoResize := .F. rs := CreateObject("ADOR.Recordset") rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",1/*adOpenKeyset*/,3/*adLockOptimistic*/) oG2antt:DataSource := rs oG2antt:SortBarVisible := .T. oG2antt:Layout := "singlesort=" + CHR(34) + "C1:1" + CHR(34) + "" oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2225 |
Is it possible to view all events the control fires
PROCEDURE OnBeforeExpandItem(oG2antt,Item,Cancel) oG2antt:Refresh() RETURN PROCEDURE OnEvent(oG2antt,EventID) DevOut( Transform(oG2antt:EventParam(-2),"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h,h1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oG2antt,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/ oG2antt:Event := {|EventID| OnEvent(oG2antt,EventID)} /*Notifies the application once the control fires an event.*/ oG2antt:BeginUpdate() oG2antt:Indent := 16 oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oG2antt:HasLines := 1/*exSolidLine*/ oG2antt:DrawGridLines := 1/*exHLines*/ oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:FirstVisibleDate := "09/20/2006" oChart:ShowCollapsedBars := .T. oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,128) oChart:DrawGridLines := 1/*exHLines*/ oBar := oChart:Bars:Item("Task") oBar:OverlaidType := 3/*exOverlaidBarsStack*/ oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor ( { 196,196,196 } ) , .F. )) oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor ( { 196,196,196 } ) , .F. )) oBar:Pattern := 32/*exPatternBox*/ oItems := oG2antt:Items() h := oItems:AddItem("Project 1") h1 := oItems:InsertItem(h,,"Resources") oItems:AddBar(h1,"Task","09/21/2006","09/25/2006","A") oItems:AddBar(h1,"Task","09/24/2006","09/28/2006","B") oItems:AddBar(h1,"Task","09/27/2006","09/29/2006","C") h := oItems:AddItem("Project 2") h1 := oItems:InsertItem(h,,"Resources") oItems:AddBar(h1,"Task","09/21/2006","09/25/2006","A") oItems:AddBar(h1,"Task","09/24/2006","09/28/2006","B") oItems:AddBar(h1,"Task","09/27/2006","09/29/2006","C") oItems:SetProperty("ExpandItem",h,.T.) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2224 |
How can I find all occurences of the giving value, within a column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oColumn,oColumn1 LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Default") oColumn := oG2antt:Columns():Add("Pos") oColumn:FormatColumn := "1 pos 'A-Z'" oColumn:Position := 0 oColumn:AllowSizing := .F. oColumn:Width := 32 oColumn:Enabled := .F. oColumn1 := oG2antt:Columns():Add("Index") oColumn1:FormatColumn := "0 index ''" oColumn1:AllowSizing := .F. oColumn1:Width := 32 oColumn1:Enabled := .F. oItems := oG2antt:Items() oItems:AddItem("A") oItems:AddItem("A") oItems:AddItem("A") DevOut( oItems:CellCaption(oItems:FindItem("A",0,0),1) ) DevOut( oItems:CellCaption(oItems:FindItem("A",0,1),1) ) DevOut( oItems:CellCaption(oItems:FindItem("A",0,2),1) ) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2223 |
How can I specify the bar's legend within the control's histogram (sample 2, expression)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Machines") oG2antt:DrawGridLines := 1/*exHLines*/ oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/ oChart := oG2antt:Chart() oChart:DrawGridLines := 1/*exHLines*/ oChart:SetProperty("PaneWidth",.F.,128) oChart:FirstVisibleDate := "01/01/2001" oChart:LevelCount := 2 oBar := oChart:Bars:Item("Task") oBar:Pattern := 1/*exPatternSolid*/ oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18) oBar:OverlaidType := 4/*exOverlaidBarsCascade*/ oBar:HistogramPattern := oBar:Pattern() oBar:HistogramType := 256/*exHistCumulative*/ oBar:HistogramCumulativeOriginalColorBars := 1/*exKeepOriginalColor*/ oBar:HistogramItems := -4 oBar:SetProperty("HistogramRulerLinesColor",AutomationTranslateColor( GraMakeRGBColor ( { 102,102,102 } ) , .F. )) oBar:SetProperty("Def",6/*exBarToolTip*/,"<%=%3%> <fgcolor 666666><font ;6><off 4><%=%C0%>") oBar:SetProperty("Def",60/*exBarHistLegend*/,"<fgcolor=666666><%=lower(%3)%>") oChart:HistogramHeight := 64 oChart:HistogramVisible := .T. oItems := oG2antt:Items() h := oItems:AddItem("Machine 1") oItems:AddBar(h,"Task","01/02/2001","01/09/2001",1,"Bill") oItems:AddBar(h,"Task","01/03/2001","01/10/2001",2,"Laura") oItems:SetProperty("ItemBar",h,2,33/*exBarColor*/,16776960) h := oItems:AddItem("Machine 2") oItems:AddBar(h,"Task","01/12/2001","01/19/2001",3,"Bill") oItems:AddBar(h,"Task","01/10/2001","01/13/2001",4,"Laura") oItems:AddBar(h,"Task","01/10/2001","01/14/2001",5,"Bill") oItems:SetProperty("ItemBar",h,4,33/*exBarColor*/,16776960) oItems:AddBar(oItems:AddItem("Machine 3"),"Task","01/02/2001","01/09/2001",6,"Bill") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2222 |
How can I specify the bar's legend within the control's histogram (sample 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Machines") oG2antt:DrawGridLines := 1/*exHLines*/ oG2antt:HeaderAppearance := 4/*Etched*/ oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/ oChart := oG2antt:Chart() oChart:DrawGridLines := 1/*exHLines*/ oChart:SetProperty("PaneWidth",.F.,128) oChart:FirstVisibleDate := "01/01/2001" oChart:LevelCount := 2 oBar := oChart:Bars:Item("Task") oBar:Pattern := 1/*exPatternSolid*/ oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18) oBar:OverlaidType := 4/*exOverlaidBarsCascade*/ oBar:HistogramPattern := oBar:Pattern() oBar:HistogramType := 256/*exHistCumulative*/ oBar:HistogramCumulativeOriginalColorBars := 1/*exKeepOriginalColor*/ oBar:HistogramItems := -4 oBar:SetProperty("Def",3/*exBarCaption*/,"Bill") oBar:SetProperty("Def",60/*exBarHistLegend*/,"B(ill)") oChart:HistogramHeight := 64 oChart:HistogramVisible := .T. oItems := oG2antt:Items() h := oItems:AddItem("Machine 1") oItems:AddBar(h,"Task","01/02/2001","01/09/2001",1) oItems:AddBar(h,"Task","01/03/2001","01/10/2001",2,"Laura") oItems:SetProperty("ItemBar",h,2,33/*exBarColor*/,16776960) oItems:SetProperty("ItemBar",h,2,60/*exBarHistLegend*/,"L(aura)") h := oItems:AddItem("Machine 2") oItems:AddBar(h,"Task","01/12/2001","01/19/2001",3) oItems:AddBar(h,"Task","01/10/2001","01/13/2001",4,"Laura") oItems:AddBar(h,"Task","01/10/2001","01/14/2001",5) oItems:SetProperty("ItemBar",h,4,33/*exBarColor*/,16776960) oItems:SetProperty("ItemBar",h,4,60/*exBarHistLegend*/,"L(aura)") oItems:AddBar(oItems:AddItem("Machine 3"),"Task","01/02/2001","01/09/2001",6) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2221 |
When I drag a bar and I drag it over other items, but just release it on one of the items (last item), the BarParentChange event is triggered for every item. I need it just when I drop it (release left mouse). How can I do this
PROCEDURE OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel) DevOut( "Hover Over Item: " ) DevOut( oG2antt:Items:CellCaption(NewItem,0) ) Cancel := oG2antt:Items:ItemData(NewItem) RETURN PROCEDURE OnChartEndChanging(oG2antt,Operation) DevOut( "ChartEndChanging " ) DevOut( Transform(Operation,"") ) RETURN PROCEDURE OnChartStartChanging(oG2antt,Operation) DevOut( "ChartStartChanging " ) DevOut( Transform(Operation,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BarParentChange := {|Item,Key,NewItem,Cancel| OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)} /*Occurs just before moving a bar from current item to another item.*/ oG2antt:ChartEndChanging := {|Operation| OnChartEndChanging(oG2antt,Operation)} /*Occurs after the chart has been changed.*/ oG2antt:ChartStartChanging := {|Operation| OnChartStartChanging(oG2antt,Operation)} /*Occurs when the chart is about to be changed.*/ oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:FirstVisibleDate := "01/01/2001" oChart:SetProperty("PaneWidth",.F.,48) oChart:AllowLinkBars := .F. oChart:Bars:Item("Task"):OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/ oG2antt:Columns():Add("Column") oItems := oG2antt:Items() h := oItems:AddItem("Item 1") oItems:SetProperty("EnableItem",h,.F.) oItems:SetProperty("ItemData",h,-1) h := oItems:AddItem("Item 2") oItems:SetProperty("ItemData",h,0) oItems:AddBar(h,"Task","01/05/2001","01/07/2001","B") oItems:SetProperty("ItemBar",h,"B",28/*exBarCanMoveToAnother*/,.T.) oItems:SetProperty("ItemData",oItems:AddItem("Item 3"),0) oItems:SetProperty("ItemData",oItems:AddItem("Item 4"),0) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2220 |
Hide non-working days, Hide non-working hours
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:FirstVisibleDate := "07/29/2022" oChart:SetProperty("Label",65536/*exHour*/,"<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536") oChart:SetProperty("PaneWidth",.F.,0) oChart:LevelCount := 2 oChart:UnitWidth := 12 oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor ( { 51,51,51 } ) , .F. )) oChart:NonworkingDaysPattern := 6/*exPatternBDiagonal*/ oChart:SetProperty("NonworkingHoursColor",AutomationTranslateColor( GraMakeRGBColor ( { 187,187,187 } ) , .F. )) oChart:NonworkingHoursPattern := 6/*exPatternBDiagonal*/ oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oLevel := oChart:Level(0) oLevel:Label := "<%dddd%>" oLevel:Alignment := 1/*CenterAlignment*/ oChart:Level(1):Label := 65536 oChart:UnitScale := 65536/*exHour*/ oChart:NonworkingHours := 16773375 oChart:ShowNonworkingUnits := .F. oChart:ShowNonworkingDates := .F. oChart:ShowNonworkingHours := .F. oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2219 |
Show non-working days pattern, Hide non-working hours
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:FirstVisibleDate := "07/29/2022" oChart:SetProperty("Label",65536/*exHour*/,"<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536") oChart:SetProperty("PaneWidth",.F.,0) oChart:LevelCount := 2 oChart:UnitWidth := 12 oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor ( { 51,51,51 } ) , .F. )) oChart:NonworkingDaysPattern := 6/*exPatternBDiagonal*/ oChart:SetProperty("NonworkingHoursColor",AutomationTranslateColor( GraMakeRGBColor ( { 187,187,187 } ) , .F. )) oChart:NonworkingHoursPattern := 6/*exPatternBDiagonal*/ oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oLevel := oChart:Level(0) oLevel:Label := "<%dddd%>" oLevel:Alignment := 1/*CenterAlignment*/ oChart:Level(1):Label := 65536 oChart:UnitScale := 65536/*exHour*/ oChart:NonworkingHours := 16773375 oChart:ShowNonworkingUnits := .F. oChart:ShowNonworkingDates := .T. oChart:ShowNonworkingHours := .F. oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2218 |
Hide non-working days, Show non-working hours pattern
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:FirstVisibleDate := "07/29/2022" oChart:SetProperty("Label",65536/*exHour*/,"<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536") oChart:SetProperty("PaneWidth",.F.,0) oChart:LevelCount := 2 oChart:UnitWidth := 12 oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor ( { 51,51,51 } ) , .F. )) oChart:NonworkingDaysPattern := 6/*exPatternBDiagonal*/ oChart:SetProperty("NonworkingHoursColor",AutomationTranslateColor( GraMakeRGBColor ( { 187,187,187 } ) , .F. )) oChart:NonworkingHoursPattern := 6/*exPatternBDiagonal*/ oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oLevel := oChart:Level(0) oLevel:Label := "<%dddd%>" oLevel:Alignment := 1/*CenterAlignment*/ oChart:Level(1):Label := 65536 oChart:UnitScale := 65536/*exHour*/ oChart:NonworkingHours := 16773375 oChart:ShowNonworkingUnits := .F. oChart:ShowNonworkingDates := .F. oChart:ShowNonworkingHours := .T. oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2217 |
Hide non-working days pattern, Show non-working hours pattern
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:FirstVisibleDate := "07/29/2022" oChart:SetProperty("Label",65536/*exHour*/,"<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536") oChart:SetProperty("PaneWidth",.F.,0) oChart:LevelCount := 2 oChart:UnitWidth := 12 oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor ( { 51,51,51 } ) , .F. )) oChart:NonworkingDaysPattern := 6/*exPatternBDiagonal*/ oChart:SetProperty("NonworkingHoursColor",AutomationTranslateColor( GraMakeRGBColor ( { 187,187,187 } ) , .F. )) oChart:NonworkingHoursPattern := 6/*exPatternBDiagonal*/ oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oLevel := oChart:Level(0) oLevel:Label := "<%dddd%>" oLevel:Alignment := 1/*CenterAlignment*/ oChart:Level(1):Label := 65536 oChart:UnitScale := 65536/*exHour*/ oChart:NonworkingHours := 16773375 oChart:ShowNonworkingUnits := .T. oChart:ShowNonworkingDates := .F. oChart:ShowNonworkingHours := .T. oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2216 |
Hide non-working days pattern, Hide non-working hours pattern
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:FirstVisibleDate := "07/29/2022" oChart:SetProperty("Label",65536/*exHour*/,"<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536") oChart:SetProperty("PaneWidth",.F.,0) oChart:LevelCount := 2 oChart:UnitWidth := 12 oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor ( { 51,51,51 } ) , .F. )) oChart:NonworkingDaysPattern := 6/*exPatternBDiagonal*/ oChart:SetProperty("NonworkingHoursColor",AutomationTranslateColor( GraMakeRGBColor ( { 187,187,187 } ) , .F. )) oChart:NonworkingHoursPattern := 6/*exPatternBDiagonal*/ oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oLevel := oChart:Level(0) oLevel:Label := "<%dddd%>" oLevel:Alignment := 1/*CenterAlignment*/ oChart:Level(1):Label := 65536 oChart:UnitScale := 65536/*exHour*/ oChart:NonworkingHours := 16773375 oChart:ShowNonworkingUnits := .T. oChart:ShowNonworkingDates := .F. oChart:ShowNonworkingHours := .F. oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2215 |
Show non-working days pattern, Hide non-working hours pattern
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:FirstVisibleDate := "07/29/2022" oChart:SetProperty("Label",65536/*exHour*/,"<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536") oChart:SetProperty("PaneWidth",.F.,0) oChart:LevelCount := 2 oChart:UnitWidth := 12 oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor ( { 51,51,51 } ) , .F. )) oChart:NonworkingDaysPattern := 6/*exPatternBDiagonal*/ oChart:SetProperty("NonworkingHoursColor",AutomationTranslateColor( GraMakeRGBColor ( { 187,187,187 } ) , .F. )) oChart:NonworkingHoursPattern := 6/*exPatternBDiagonal*/ oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oLevel := oChart:Level(0) oLevel:Label := "<%dddd%>" oLevel:Alignment := 1/*CenterAlignment*/ oChart:Level(1):Label := 65536 oChart:UnitScale := 65536/*exHour*/ oChart:NonworkingHours := 16773375 oChart:ShowNonworkingUnits := .T. oChart:ShowNonworkingDates := .T. oChart:ShowNonworkingHours := .F. oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2214 |
Show non-working days pattern, Show non-working hours pattern
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oLevel oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:FirstVisibleDate := "07/29/2022" oChart:SetProperty("Label",65536/*exHour*/,"<font ;6><%h%><|><font ;6><%hh%><|><%h%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%><||><||>65536") oChart:SetProperty("PaneWidth",.F.,0) oChart:LevelCount := 2 oChart:UnitWidth := 12 oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor ( { 51,51,51 } ) , .F. )) oChart:NonworkingDaysPattern := 6/*exPatternBDiagonal*/ oChart:SetProperty("NonworkingHoursColor",AutomationTranslateColor( GraMakeRGBColor ( { 187,187,187 } ) , .F. )) oChart:NonworkingHoursPattern := 6/*exPatternBDiagonal*/ oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oLevel := oChart:Level(0) oLevel:Label := "<%dddd%>" oLevel:Alignment := 1/*CenterAlignment*/ oChart:Level(1):Label := 65536 oChart:UnitScale := 65536/*exHour*/ oChart:NonworkingHours := 16773375 oChart:ShowNonworkingUnits := .T. oChart:ShowNonworkingDates := .T. oChart:ShowNonworkingHours := .T. oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2213 |
The chart display no labels (empty header) when the unit's width is too small. What can I do to change this behavior
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oChart := oG2antt:Chart() oChart:SetProperty("Label",4096/*exDay*/,"<font ;6><%d1%><|><%d1%><|><%d2%><|><%d3%><|><%dddd%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096") oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/ oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,0) oChart:SetProperty("MarkTodayColor",oChart:BackColor()) oChart:UnitScale := 4096/*exDay*/ oChart:UnitWidth := 12 oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2212 |
How do I get the height of the bar from the cursor
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y) LOCAL b,i,n b := oG2antt:Chart:BarFromPoint(-1,-1) i := oG2antt:ItemFromPoint(-1,-1,c,hit) n := oG2antt:Items:ItemBar(i,b,0/*exBarName*/) DevOut( "Height" ) DevOut( Transform(oG2antt:Chart:Bars():Item(n):Height(),"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/ oG2antt:BeginUpdate() oG2antt:Columns():Add("Tasks") oG2antt:DefaultItemHeight := 52 oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "10/10/2017" oChart:SetProperty("PaneWidth",.F.,0) oChart:NonworkingDays := 0 oChart:SetProperty("MarkTodayColor",oChart:BackColor()) oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/ oChart:Bars():CallMethod("Copy","Task","T1"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oChart:Bars():CallMethod("Copy","Task","T2"):Height := 25 oItems := oG2antt:Items() h1 := oItems:AddItem("Task") oItems:AddBar(h1,"T1","10/15/2017","10/25/2017","2") oItems:AddBar(h1,"T2","10/18/2017","10/22/2017","1") h1 := oItems:AddItem("Task") oItems:AddBar(h1,"T1","10/15/2017","10/25/2017","1") oItems:AddBar(h1,"T2","10/18/2017","10/22/2017","2") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2211 |
The zone shows truncated if I use BackColorAlternate. Is there anything I can do so it shows as solid instead
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,0) oChart:LevelCount := 2 oChart:FirstVisibleDate := "01/01/2010" oChart:MarkTimeZone("Z1","01/04/2010","01/04/2010",16744544,"1:3;;solid-zone") oChart:MarkTimeZone("Z2","01/08/2010","01/08/2010",16744544,"0:3;;truncated-zone") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2210 |
How can I prevent expanding/collapsing the child items
PROCEDURE OnBeforeExpandItem(oG2antt,Item,Cancel) Cancel := oG2antt:Items():ItemParent(Item) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oG2antt,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/ oG2antt:BeginUpdate() oG2antt:SingleSel := .F. oG2antt:Columns():Add("Default") oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oItems := oG2antt:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(oItems:InsertItem(h,,"Child 1.1"),,"Child") oItems:InsertItem(h,,"Child 1.2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:InsertItem(oItems:InsertItem(h,,"Child 2.1"),,"Child") oItems:InsertItem(h,,"Child 2.2") oItems:SetProperty("ExpandItem",h,.T.) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2209 |
How can I display the EBN bigger or smaller (thumb)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oAppearance LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oAppearance := oG2antt:VisualAppearance() oAppearance:Add(1,"c:\exontrol\images\normal.ebn") oAppearance:Add(10,"CP:1 0 3 0 -3") oAppearance:Add(17,"CP:1 3 0 -3 0") oG2antt:SetProperty("Background",388/*exHSThumb*/,0xa000000) oG2antt:SetProperty("Background",260/*exVSThumb*/,0x11000000) oG2antt:ScrollBars := 3855/*exVScrollEmptySpace+exHScrollEmptySpace+exVScrollOnThumbRelease+exHScrollOnThumbRelease+exDisableBoth*/ oG2antt:ScrollBySingleLine := .T. oG2antt:Columns():Add("Def") oItems := oG2antt:Items() oItems:AddItem(1) oItems:AddItem(2) oItems:AddItem(3) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2208 |
I am using GroupBy feature to create a tree, but the top rows are aligned with the children, not indented. What could be wrong
PROCEDURE OnAddGroupItem(oG2antt,Item) LOCAL oItems LOCAL color color := 14474460 oItems := oG2antt:Items() oItems:SetProperty("ItemDivider",Item,-1) oItems:SetProperty("CellValue",Item,1,oItems:CellCaption(Item,oItems:GroupItem(Item))) oItems:AddBar(Item,"Progress","12/02/2017","12/02/2017") oItems:DefineSummaryBars(Item,"",-3,"") oItems:SetProperty("ItemBold",Item,.T.) oItems:SetProperty("ItemBackColor",Item,color) oG2antt:Chart():SetProperty("ItemBackColor",Item,color) RETURN PROCEDURE OnAddItem(oG2antt,Item) LOCAL oItems oItems := oG2antt:Items() oItems:AddBar(Item,"Task","12/04/2017","12/10/2017") oItems:SetProperty("ItemBar",Item,"",514/*exBarMove*/,oItems:ItemToIndex(Item)) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oColumns LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/ oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/ oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/02/2017" oChart:SetProperty("PaneWidth",.F.,128) oColumns := oG2antt:Columns() oColumns:Add("C1") oColumns:Add("C2") oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oG2antt:SortBarVisible := .T. oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column." oG2antt:AllowGroupBy := .T. oItems := oG2antt:Items() h := oItems:AddItem("Item A") oItems:SetProperty("CellValue",h,1,"SubItem A.1") h := oItems:AddItem("Item A") oItems:SetProperty("CellValue",h,1,"SubItem A.1") h := oItems:AddItem("Item A") oItems:SetProperty("CellValue",h,1,"SubItem A.1") h := oItems:AddItem("Item A") oItems:SetProperty("CellValue",h,1,"SubItem A.1") h := oItems:AddItem("Item B") oItems:SetProperty("CellValue",h,1,"SubItem B.1") h := oItems:AddItem("Item B") oItems:SetProperty("CellValue",h,1,"SubItem B.1") oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/ oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2207 |
How can I change the names from English to my locale (localization)
|
2206 |
Is it possible to change the pattern for selection within the control's overview part (I would prefer a semi-transparent or solid color instead)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:VisualAppearance():Add(2,"gBFLBCJwBAEHhEJAAEhABMsGACAADACAxRDgMQBQKAAzQFAYbhkGCGAAGMZxRgmFgAQhFcZQSKUOQTDKMIziYBYJAKCQ5DBJUBjTBcEwKGCQBwASQpUhqHYDTbIMByBIUIxUACUJAgeCRYiAMo8RrSEZARBNGR3GqaJ7oGTpRoaP4iSBTUThBRsPyhHqOBpEWIRSqKEQ1DBYcI2RZUaxBJQAAbrWr5VpKKYnSzBA4TBQkSTpGicZxteoJeiefIEVTHFwRNaFNS1Linb7ia5qCwmOJXUjcYAYfBOIR1SSBbIsawbNACbJnWjENYVdAdNTlAbPNAyPBqSDaMYRDCOND1BhuNATWSNLq2XZ5OzrGIaVjmWbbfwELZFUqydJ0exeiYNw/kGZBuDCHR/DeEYaCgGhMGcQ4pkiSxDgGXhIESW5MFgbQJBQZx+DScJEGsVZdnufggG+f5fnPFB/ooBZ/EaIAoBYBoBmASAeAqApfjgJgMgOYAoDoEIEl+WBKBS" +; "BQhGgXgQgYYYoDIHIHGCKB+CCAYiCiDgREWYhoG4KIKGGaIuCyCBfhiRQJDqXxgAEASAg") oG2antt:SelBackMode := 1/*exTransparent*/ oG2antt:Columns():Add("Tasks") oChart := oG2antt:Chart() oChart:OverviewVisible := -1/*exOverviewShowAll*/ oChart:OverviewHeight := 64 oChart:FirstVisibleDate := "07/30/2018" oChart:LevelCount := 2 oChart:SetProperty("PaneWidth",.F.,128) oChart:SetProperty("SelBackColor",oG2antt:SelBackColor()) oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,128,128 } ) , .F. )) oChart:SetProperty("OverviewSelBackColor",0x200ff00) oChart:SetProperty("OverviewSelTransparent",.T.,50) oG2antt:SetProperty("SelBackColor",oG2antt:BackColor()) oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor()) oItems := oG2antt:Items() oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/08/2017") oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2018","08/10/2018") oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2019","08/12/2019") oItems:SetProperty("SelectItem",oItems:ItemByIndex(1),.T.) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2205 |
How can I display an item of picture type
|
2204 |
How can I bold the root group-items
PROCEDURE OnAddGroupItem(oG2antt,Item) LOCAL oItems oItems := oG2antt:Items() oItems:AddBar(Item,"Progress","12/02/2017","12/02/2017") oItems:DefineSummaryBars(Item,"",-3,"") oItems:SetProperty("ItemBold",Item,.T.) RETURN PROCEDURE OnAddItem(oG2antt,Item) oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/10/2017") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oColumn,oColumn1 LOCAL oColumns LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/ oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/ oG2antt:BeginUpdate() oChart := oG2antt:Chart() oChart:LevelCount := 2 oChart:FirstVisibleDate := "12/02/2017" oChart:SetProperty("PaneWidth",.F.,342) oColumns := oG2antt:Columns() oColumn := oColumns:Add("C1") oColumn:GroupByFormatCell := "'<caption> (' + value + ')'" oColumns:Add("C2") oColumns:Add("C3") oColumn1 := oColumns:Add("Pos") oColumn1:FormatColumn := "1 pos ``" oColumn1:AllowGroupBy := .F. oColumn1:Position := 0 oColumn1:Width := 48 oColumn1:AllowSizing := .F. oG2antt:SortBarVisible := .T. oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column." oG2antt:AllowGroupBy := .T. oItems := oG2antt:Items() h := oItems:AddItem("Item A") oItems:SetProperty("CellValue",h,1,"SubItem A.1") oItems:SetProperty("CellValue",h,2,"SubItem A.2") h := oItems:AddItem("Item A") oItems:SetProperty("CellValue",h,1,"SubItem A.1") oItems:SetProperty("CellValue",h,2,"SubItem A.2") h := oItems:AddItem("Item A") oItems:SetProperty("CellValue",h,1,"SubItem A.1") oItems:SetProperty("CellValue",h,2,"SubItem A.2") h := oItems:AddItem("Item A") oItems:SetProperty("CellValue",h,1,"SubItem A.1") oItems:SetProperty("CellValue",h,2,"SubItem A.2") h := oItems:AddItem("Item B") oItems:SetProperty("CellValue",h,1,"SubItem B.1") oItems:SetProperty("CellValue",h,2,"SubItem B.2") h := oItems:AddItem("Item B") oItems:SetProperty("CellValue",h,1,"SubItem B.1") oItems:SetProperty("CellValue",h,2,"SubItem B.2") oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/ oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2203 |
The exBarTransparent does not work for overlaid-bars
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar LOCAL oChart LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oG2antt:Columns():Add("Task") oChart := oG2antt:Chart() oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oChart:AllowLinkBars := .F. oChart:SetProperty("PaneWidth",.F.,48) oChart:FirstVisibleDate := "01/01/2001" oChart:LevelCount := 2 oBar := oChart:Bars:Item("Task") oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:Pattern := 1/*exPatternSolid*/ oBar:SetProperty("Overlaid",256/*exOverlaidBarsTransparent*/,0) oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>") oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18) oItems := oG2antt:Items() h := oItems:AddItem("Task 1") oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1") oItems:AddBar(h,"Task","01/03/2001","01/05/2001","A2") h := oItems:AddItem("Task 2") oItems:AddBar(h,"Task","01/07/2001","01/11/2001","B1") oItems:AddBar(h,"Task","01/08/2001","01/12/2001","B2") oItems:SetProperty("ItemBar",0,"<*>",19/*exBarTransparent*/,75) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2202 |
We’re adding tasks on the chart which have a caption that is not clipped (and left aligned). When we add another task right after the first one, then the caption from that first bar is “stuck” behind the second bar. The bar's z-order is determined by the bar's key.
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oBar,oBar1 LOCAL oChart LOCAL oItems LOCAL h1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Tasks") oG2antt:DefaultItemHeight := 24 oChart := oG2antt:Chart() oChart:NonworkingDays := 0 oChart:FirstVisibleDate := "09/17/2006" oChart:SetProperty("PaneWidth",.F.,96) oChart:LevelCount := 2 oBar := oChart:Bars():Add("Green") oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor ( { 0,255,0 } ) , .F. )) oBar:SetProperty("Def",18/*exBarOffset*/,-2) oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>") oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18) oBar1 := oChart:Bars():Add("Red") oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oBar1:SetProperty("Def",18/*exBarOffset*/,2) oBar1:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>") oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18) oItems := oG2antt:Items() h1 := oItems:AddItem("Red / Green") oItems:AddBar(h1,"Green","09/21/2006","09/27/2006","K1") oItems:AddBar(h1,"Red","09/23/2006","09/25/2006","K2") h1 := oItems:AddItem("Green / Red") oItems:AddBar(h1,"Green","09/21/2006","09/27/2006","K2") oItems:AddBar(h1,"Red","09/23/2006","09/25/2006","K1") oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2201 |
The caption/text of the link is overwritten by its line. What can be done
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2antt LOCAL oChart LOCAL oItems LOCAL h,h1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2antt := XbpActiveXControl():new( oForm:drawingArea ) oG2antt:CLSID := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/ oG2antt:create(,, {10,60},{610,370} ) oG2antt:BeginUpdate() oG2antt:Columns():Add("Task") oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,64) oChart:FirstVisibleDate := "06/21/2005" oChart:ResizeUnitScale := 65536/*exHour*/ oChart:UnitWidth := 48 oChart:Level(0):Label := "<b><%mmm%></b> <%dd%>" oChart:LinksWidth := 3 oItems := oG2antt:Items() h := oItems:AddItem("Root") oItems:AddBar(h,"Task","06/22/2005","06/23/2005") h1 := oItems:InsertItem(h,,"Child") oItems:AddBar(h1,"Task","06/24/2005 08:00:00","06/24/2005 16:00:00") oItems:AddLink("Link1",h,"",h1,"") oItems:SetProperty("Link","Link1",12/*exLinkText*/,"<bgcolor=FFFFFF> link </bgcolor>") oItems:SetProperty("ExpandItem",h,.T.) oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |