50 |
How do I get the start/end of the bar once the BarResize/BarResizing event occurs
PROCEDURE OnHostEvent(oG2Host,EventID) LOCAL h,key h := oG2Host:HostEventParam(0) key := oG2Host:HostEventParam(1) DevOut( Transform(oG2Host:HostEventParam(-2),"") ) DevOut( "Start:" ) DevOut( Transform(oG2Host:Host:Items():ItemBar(h,key,1/*exBarStart*/),"") ) DevOut( Transform(oG2Host:HostEventParam(-2),"") ) DevOut( "End:" ) DevOut( Transform(oG2Host:Host:Items():ItemBar(h,key,2/*exBarEnd*/),"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oChart LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:HostEvent := {|EventID| OnHostEvent(oG2Host,EventID)} /*Notifies the application once the host fires an event.*/ oChart := oG2Host:Host():Chart() oChart:SetProperty("PaneWidth",.F.,128) oChart:FirstVisibleDate := "03/30/2019" oItems := oG2Host:Host():Items() oItems:AddBar(oItems:AddItem("Task"),"Task","04/01/2019","04/14/2019") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
49 |
How do I get the bar/task from the cursor
|
48 |
How do I get the cell from the cursor
|
47 |
How can I highlights cells based on its value
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oColumn,oColumn1 LOCAL oConditionalFormats LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataField",12/*exTasksColor*/,"Color") oG2Host:SetProperty("DataField",13/*exTasksCaption*/,"TaskName") oG2antt := oG2Host:Host() oG2antt:BeginUpdate() oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oColumn := oG2antt:Columns:Item("Title") oColumn:SetProperty("Def",4/*exCellBackColor*/,15790320) oColumn:Width := oColumn:AutoWidth() oConditionalFormats := oG2antt:ConditionalFormats() oConditionalFormats:Add("lower(%4) contains `manager`"):Bold := .T. oConditionalFormats:Add("%3"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 240,240,240 } ) , .F. )) oG2antt:Items():SetProperty("ExpandItem",0,.T.) oColumn1 := oG2antt:Columns:Item("EmployeeID") oColumn1:Width := oColumn1:AutoWidth() oG2antt:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
46 |
How do I programatically hide a column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataField",12/*exTasksColor*/,"Color") oG2Host:SetProperty("DataField",13/*exTasksCaption*/,"TaskName") oG2Host:Host():Columns:Item("LastName"):Visible := .F. oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
45 |
Is it possible to get the information from the control when we click on the bar/item
|
44 |
How do I get the bar from the cursor
|
43 |
How do I add Start/End columns
|
42 |
How do I hide the left/items/columns part of the control
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar LOCAL oChart LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:Pattern := 1/*exPatternSolid*/ oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,255 } ) , .F. )) oBar:SetProperty("Def",19/*exBarTransparent*/,50) oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataField",12/*exTasksColor*/,"Color") oG2Host:SetProperty("DataField",13/*exTasksCaption*/,"TaskName") oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:HostReadOnly := 255/*exHostReadWrite+exHostAllowAddEmptyItem*/ oG2antt := oG2Host:Host() oG2antt:OnResizeControl := 129/*exDisableSplitter+exResizeChart*/ oChart := oG2antt:Chart() oChart:ColumnsFormatLevel := "1" oChart:SetProperty("PaneWidth",.F.,0) oChart:ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
41 |
How do I hide the right/chart/tasks part of the control
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar LOCAL oChart LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:Pattern := 1/*exPatternSolid*/ oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,255 } ) , .F. )) oBar:SetProperty("Def",19/*exBarTransparent*/,50) oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataField",12/*exTasksColor*/,"Color") oG2Host:SetProperty("DataField",13/*exTasksCaption*/,"TaskName") oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2antt := oG2Host:Host() oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.T.,0) oChart:OverviewVisible := 0/*exOverviewHidden*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
40 |
How do hide the top/overview part of the control
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oChart LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,oG2Host:DataField(0/*exItemsDataSource*/)) oG2Host:SetProperty("DataField",9/*exTasksStart*/,"BirthDate") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"HireDate") oG2antt := oG2Host:Host() oChart := oG2antt:Chart() oChart:OverviewVisible := 0/*exOverviewHidden*/ oChart:SetProperty("PaneWidth",.F.,256) oChart:ScrollTo("04/27/1969",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
39 |
How do I resize the panels
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar LOCAL oChart LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2antt := oG2Host:Host() oG2antt:VisualAppearance():Add(1,"C:\Program Files\Exontrol\ExG2Host\Sample\EBN\Assorted\wbs-ass.ebn") oBar := oG2antt:Chart():Bars:Item("Task") oBar:Height := 15 oBar:SetProperty("Color",0x1ff0000) oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataField",12/*exTasksColor*/,"Color") oG2Host:SetProperty("DataField",13/*exTasksCaption*/,"TaskName") oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oChart := oG2Host:Host():Chart() oChart:SetProperty("PaneWidth",.F.,128) oChart:ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
38 |
How do I lock the first column
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2antt := oG2Host:Host() oG2antt:CountLockedColumns := 1 oG2antt:SetProperty("BackColorLock",oG2antt:BackColorAlternate()) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
37 |
How do I specify a different color for the tasks ( EBN color )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2antt := oG2Host:Host() oG2antt:VisualAppearance():Add(1,"C:\Program Files\Exontrol\ExG2Host\Sample\EBN\Assorted\wbs-ass.ebn") oBar := oG2antt:Chart():Bars:Item("Task") oBar:Height := 15 oBar:SetProperty("Color",0x1ff0000) oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataField",12/*exTasksColor*/,"Color") oG2Host:SetProperty("DataField",13/*exTasksCaption*/,"TaskName") oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:Host():Chart():SetProperty("PaneWidth",.F.,256) oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
36 |
How do I specify a different color for the tasks ( solid color, transparent )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:Pattern := 1/*exPatternSolid*/ oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,255 } ) , .F. )) oBar:SetProperty("Def",19/*exBarTransparent*/,50) oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataField",12/*exTasksColor*/,"Color") oG2Host:SetProperty("DataField",13/*exTasksCaption*/,"TaskName") oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:Host():Chart():SetProperty("PaneWidth",.F.,256) oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
35 |
GroupBy
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar LOCAL oColumn LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataSource","Links",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Links","EmployeeLinks") oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oG2antt := oG2Host:Host() oG2antt:AllowGroupBy := .T. oG2antt:SortBarVisible := .T. oG2antt:SetProperty("BackColorSortBar",oG2Host:Host():BackColor()) oG2antt:SetProperty("BackColorSortBarCaption",oG2antt:BackColorSortBar()) oG2antt:SortBarCaption := "<sha ;;0><fgcolor=FF0000>Drag a <b>column</b> header here to sort by that column." oBar := oG2antt:Chart():Bars:Item("Task") oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2antt:Items():SetProperty("ExpandItem",0,.T.) oG2antt:CountLockedColumns := 1 oG2antt:SetProperty("BackColorLock",oG2antt:BackColorAlternate()) oColumn := oG2antt:Columns:Item("EmployeeID") oColumn:AllowGroupBy := .F. oColumn:SetProperty("Def",7/*exHeaderBackColor*/,oG2Host:Host():BackColorAlternate()) oG2antt:Columns:Item("Title"):SortOrder := 1/*SortAscending*/ oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
34 |
How can I hide a column
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:Host():Columns:Item(0):Visible := .F. oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
33 |
Can row errors being highligted until the user correct them, not to clear them as soon a change occurs
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("HostDef",7/*exErrorClearOnChange*/,.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
32 |
No error is highligthed
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
31 |
I've noticed that rows with errors are shown in red. Is it possible to change the colors
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("HostDef",6/*exErrorBackColor*/,0) oG2Host:SetProperty("HostDef",5/*exErrorForeColor*/,16777215) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
30 |
Is it possible to rename the (New) to something else
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:SetProperty("HostDef",1/*exNew*/,"*") oG2antt := oG2Host:Host() oG2antt:BeginUpdate() oG2antt:Items():AddItem("A") oG2antt:Items():AddItem("B") oG2antt:EndUpdate() oG2Host:Refresh() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
29 |
How can I hide the (New) item (sample 2)
|
28 |
How can I hide the (New) item (sample 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:SetProperty("HostDef",1/*exNew*/,"") oG2antt := oG2Host:Host() oG2antt:BeginUpdate() oG2antt:Items():AddItem("A") oG2antt:Items():AddItem("B") oG2antt:EndUpdate() oG2Host:Refresh() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
27 |
Read-Only
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:HostReadOnly := 0/*exHostReadOnly*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
26 |
How can I prevent user create new /delete tasks ( only move or resize then )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataSource","Links",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Links","EmployeeLinks") oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:HostReadOnly := 128/*exHostAllowUpdate*/ oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
25 |
How do I get the row/item/task/link from the cursor
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN PROCEDURE OnHostEvent(oG2Host,EventID) DevOut( oG2Host:HostContext:ToString() ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:HostEvent := {|EventID| OnHostEvent(oG2Host,EventID)} /*Notifies the application once the host fires an event.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:HostReadOnly := 141/*exHostAllowUpdate+exHostAllowAddNew*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
24 |
Disable Delete
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:HostReadOnly := 141/*exHostAllowUpdate+exHostAllowAddNew*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
23 |
Disable AddNew
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:HostReadOnly := 240/*exHostAllowUpdate+exHostAllowDelete*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
22 |
ACCDB sample ( file )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataSource","Links",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Links","EmployeeLinks") oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
21 |
MDB sample ( file )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.mdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataSource","Links",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Links","EmployeeLinks") oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
20 |
DBF sample ( file )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.dbf") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
19 |
DAO sample ( object, DAO.DBEngine.120, multiple tasks, multiple tables )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oDatabase LOCAL oG2Host LOCAL oBar LOCAL rsEmployees,rsLinks,rsTasks LOCAL oPrivDBEngine oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oPrivDBEngine := CreateObject("DAO.DBEngine.120") oDatabase := oPrivDBEngine:OpenDatabase("C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") rsEmployees := oDatabase:OpenRecordset("Employees") rsTasks := oDatabase:OpenRecordset("EmployeeDetails") rsLinks := oDatabase:OpenRecordset("EmployeeLinks") oG2Host:SetProperty("DataSource","Items",rsEmployees) oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataSource","Tasks",rsTasks) oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataSource","Links",rsLinks) oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
18 |
DAO sample ( file, multiple tasks, multiple tables )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataTechnology","Items","DAO.DBEngine.120;DAO.DBEngine.36") oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataTechnology","Tasks","DAO.DBEngine.120;DAO.DBEngine.36") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataTechnology","Links","DAO.DBEngine.120;DAO.DBEngine.36") oG2Host:SetProperty("DataSource","Links",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Links","EmployeeLinks") oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
17 |
DAO sample ( object, DAO.DBEngine.120, single task, single table )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oDatabase LOCAL oG2Host LOCAL rsEmployees,rsLinks LOCAL oPrivDBEngine oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oPrivDBEngine := CreateObject("DAO.DBEngine.120") oDatabase := oPrivDBEngine:OpenDatabase("C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") rsEmployees := oDatabase:OpenRecordset("Employees") rsLinks := oDatabase:OpenRecordset("EmployeeLinks") oG2Host:SetProperty("DataSource","Items",rsEmployees) oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,oG2Host:DataField(0/*exItemsDataSource*/)) oG2Host:SetProperty("DataField",9/*exTasksStart*/,"BirthDate") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"HireDate") oG2Host:SetProperty("DataSource","Links",rsLinks) oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
16 |
DAO sample ( file, single task, single table )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataTechnology","Items","DAO.DBEngine.120;DAO.DBEngine.36") oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,oG2Host:DataField(0/*exItemsDataSource*/)) oG2Host:SetProperty("DataField",9/*exTasksStart*/,"BirthDate") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"HireDate") oG2Host:SetProperty("DataTechnology","Links","DAO.DBEngine.120;DAO.DBEngine.36") oG2Host:SetProperty("DataSource","Links",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Links","EmployeeLinks") oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
15 |
DAO sample ( tree recordset )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataTechnology","Items","DAO.DBEngine.120;DAO.DBEngine.36") oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
14 |
DAO sample ( flat recordset )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oDatabase LOCAL oG2Host LOCAL rsEmployees LOCAL oPrivDBEngine oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oPrivDBEngine := CreateObject("DAO.DBEngine.120") oDatabase := oPrivDBEngine:OpenDatabase("C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") rsEmployees := oDatabase:OpenRecordset("Employees") oG2Host:SetProperty("DataSource","Items",rsEmployees) oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
13 |
DAO sample ( flat )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataTechnology","Items","DAO.DBEngine.120;DAO.DBEngine.36") oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
12 |
ADO sample ( object, ADODB.Recordset, multiple tasks )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar LOCAL rsEmployees,rsLinks,rsTasks oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ rsEmployees := CreateObject("ADODB.Recordset") rsEmployees:Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2Host:SetProperty("DataSource","Items",rsEmployees) oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") rsTasks := CreateObject("ADODB.Recordset") rsTasks:Open("EmployeeDetails","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2Host:SetProperty("DataSource","Tasks",rstasks) oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") rsLinks := CreateObject("ADODB.Recordset") rsLinks:Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2Host:SetProperty("DataSource","Links",rsLinks) oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
11 |
ADO sample ( file, multiple tasks, multiple tables )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oBar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataTechnology","Items","ADODB.Recordset;ADOR.Recordset") oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataTechnology","Tasks","ADODB.Recordset;ADOR.Recordset") oG2Host:SetProperty("DataSource","Tasks",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Tasks","EmployeeDetails") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,"Tasks") oG2Host:SetProperty("DataField",8/*exTasksItemID*/,"EmployeeID") oG2Host:SetProperty("DataField",9/*exTasksStart*/,"DateStart") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"DateEnd") oG2Host:SetProperty("DataField",14/*exTasksID*/,"TaskID") oG2Host:SetProperty("DataTechnology","Links","ADODB.Recordset;ADOR.Recordset") oG2Host:SetProperty("DataSource","Links",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Links","EmployeeLinks") oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oBar := oG2Host:Host():Chart():Bars:Item("Task") oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/ oBar:OverlaidGroup := "Task,Progress" oG2Host:Host():Items():SetProperty("ExpandItem",0,.T.) oG2Host:Host():Chart():ScrollTo("05/27/2017",1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
10 |
ADO sample ( object, ADODB.Recordset, single task, single table )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL rsEmployees,rsLinks oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ rsEmployees := CreateObject("ADODB.Recordset") rsEmployees:Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2Host:SetProperty("DataSource","Items",rsEmployees) oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,oG2Host:DataField(0/*exItemsDataSource*/)) oG2Host:SetProperty("DataField",9/*exTasksStart*/,"BirthDate") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"HireDate") rsLinks := CreateObject("ADODB.Recordset") rsLinks:Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2Host:SetProperty("DataSource","Links",rsLinks) oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
9 |
ADO sample ( file, single task, single table )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataTechnology","Items","ADODB.Recordset;ADOR.Recordset") oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oG2Host:SetProperty("DataField",7/*exTasksDataSource*/,oG2Host:DataField(0/*exItemsDataSource*/)) oG2Host:SetProperty("DataField",9/*exTasksStart*/,"BirthDate") oG2Host:SetProperty("DataField",10/*exTasksEnd*/,"HireDate") oG2Host:SetProperty("DataTechnology","Links","ADODB.Recordset;ADOR.Recordset") oG2Host:SetProperty("DataSource","Links",oG2Host:DataSource("Items")) oG2Host:SetProperty("DataMember","Links","EmployeeLinks") oG2Host:SetProperty("DataField",15/*exLinksDataSource*/,"Links") oG2Host:SetProperty("DataField",16/*exLinksStart*/,"Start") oG2Host:SetProperty("DataField",17/*exLinksEnd*/,"End") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
8 |
ADO sample ( tree recordset )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataTechnology","Items","ADODB.Recordset;ADOR.Recordset") oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2Host:SetProperty("DataField",1/*exItemsID*/,"EmployeeID") oG2Host:SetProperty("DataField",2/*exItemsParentID*/,"ReportsTo") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
7 |
ADO sample ( flat recordset )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL rsEmployees oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ rsEmployees := CreateObject("ADODB.Recordset") rsEmployees:Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/) oG2Host:SetProperty("DataSource","Items",rsEmployees) oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
6 |
ADO sample ( flat table )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataTechnology","Items","ADODB.Recordset;ADOR.Recordset") oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.accdb") oG2Host:SetProperty("DataMember","Items","Employees") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
5 |
XML sample ( object, MSXML.DOMDocument )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oG2antt LOCAL xml oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ xml := CreateObject("MSXML.DOMDocument") xml:async := .F. xml:load("C:\Program Files\Exontrol\ExG2Host\Sample\sample.xml") oG2Host:SetProperty("DataSource","Items",xml) oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2antt := oG2Host:Host() oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oG2antt:SingleSel := .F. oG2antt:AutoDrag := 3/*exAutoDragPositionAny*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
4 |
XML sample ( file tree )
PROCEDURE OnError(oG2Host,Error,Description) DevOut( Transform(Error,"") ) DevOut( Transform(Description,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:Error := {|Error,Description| OnError(oG2Host,Error,Description)} /*Fired when an internal error occurs.*/ oG2Host:SetProperty("DataTechnology","Items","MSXML.DOMDocument") oG2Host:SetProperty("DataSource","Items","C:\Program Files\Exontrol\ExG2Host\Sample\sample.xml") oG2Host:SetProperty("DataField",0/*exItemsDataSource*/,"Items") oG2antt := oG2Host:Host() oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/ oG2antt:SingleSel := .F. oG2antt:AutoDrag := 3/*exAutoDragPositionAny*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
3 |
How can I let user create new items/bars when clicking the empty area of the control
PROCEDURE OnHostEvent(oG2Host,EventID) DevOut( Transform(oG2Host:HostEventParam(-2),"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host LOCAL oChart LOCAL oG2antt oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) oG2Host:HostEvent := {|EventID| OnHostEvent(oG2Host,EventID)} /*Notifies the application once the host fires an event.*/ oG2Host:HostReadOnly := 255/*exHostReadWrite+exHostAllowAddEmptyItem*/ oG2antt := oG2Host:Host() oG2antt:ScrollBars := 2058/*exVScrollEmptySpace+exDisableNoVertical*/ oChart := oG2antt:Chart() oChart:SetProperty("PaneWidth",.F.,128) oChart:AllowCreateBar := 1/*exCreateBarAuto*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
2 |
How do I handle events of the host
|
1 |
How can I get the version of the host/exg2antt control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oG2Host oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oG2Host := XbpActiveXControl():new( oForm:drawingArea ) oG2Host:CLSID := "Exontrol.G2Host.1" /*{DFE195F7-4F43-482A-A14B-0C97B032A5E1}*/ oG2Host:create(,, {10,60},{610,370} ) DevOut( oG2Host:Version() ) DevOut( "Host" ) DevOut( oG2Host:Host:Version() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |