VDF-SIG Codejock Classes Hi, My name is ! From ! The main authors are:- Martin Pincott, Ian Smith and Peter Bragg. The reason for doing all this work and giving it away for free is simple: - To improve and fast track development To improve the look and usability of all of our products The more developers use it, the better support from DAW (which has already started to happen) Our goal is to have a good set of classes that the Dataflex developers can trust and use without having to fully understand com. Oh and to have fun... DAW are supporting this porject. Martin Pincott ASCKEY Data Services
Codejock 1. Codejock components 2. Data Access components 3. VDF-SIG Classes 4. Sig Training Courses
Codejock Xtreme SuitePro Xtreme CommandBars Included in VDF 14.1 Xtreme SkinFramework Included in VDF 14.1 Xtreme DockingPane Xtreme ShortcutBar Xtreme TaskPanel Xtreme PropertyGrid Xtreme CalendarPro Xtreme ReportControl Included in VDF 16.0 Xtreme Controls With Xtreme SuitePro you can create powerful enterprise class applications that incorporate a full set of highly customizable user interface components that include Microsoft� Office style toolbars and menus. Xtreme CommandBars CommandBars provides fully customizable menus and toolbars. Xtreme SkinFramework SkinFramework provides an application skinning framework technology for use with Windows Themes and Visual Styles Xtreme DockingPane DockingPane provides comprehensive, fully customizable docking panes giving your application a professional and modern interface. Xtreme ShortcutBar ShortcutBar provides a navigation panel similar to the navigation panel seen in Microsoft Outlook Xtreme TaskPanel TaskPanel provides an Office style Task Panel similar to Microsofts Office and Windows Explorer. Xtreme PropertyGrid PropertyGrid provides a comprehensive, fully customizable property grid giving your application a professional and modern interface. Xtreme CalendarPro CalendarPro provides with an Outlook style calendar Xtreme ReportControl ReportControl provides an Office style Reporting grid component. Xtreme Controls Other Controls provides numerous ready-to-use components Developer license from: $399 With one year subscription from: $499 Subscription renewal from: $169
VDF-SIG Classes Client Area Tabs Docking Panels Short Cut Bar Task Panel Popup Message Control Message Task Dialogues Month Calendar (Pop Up) Property Grid Push Buttons Tri-State Checkbox XAML (Label Control) Report Control (List/Grid) Calendar Tree View Class sets that are done… Client Area Tabs Docking Panels Short Cut Bar Task Panel Popup Control Task Dialogues Month Calendar (Pop Up) Property Grid Push Buttons Tri-State Checkbox XAML (Label Control) Report Control - Supports :- Text, Dataflex, SQL For both the dataflex and mertech drivers Calendar Menu System Improvements (WIP) Web Browser
Sig Training Courses Getting Started Docking Panes Property Grid Report Control Calendar Control
VDF-SIG Class set Questions?
Getting Started Requirements 1. Codejock Installation 2. Sig Libraries 3. Workspaces 4. Codejock this!
USB Pen Create a temp directory .\devsig Copy the contents of the USB pen to your .\devsig directory This includes: - Codejock Training (Today's training course) Codejock Classes (Sig CJ Class sets) Installs (Codejock 15.2.1 eval Pro suite) SigCj.chm (VDF Studio Help)
Codejock Installation If you don’t have the Full set of Codejock Version n.n.n installed then:- Make sure you have Administrator rights and if running Vista turn off UAC for the installations. Run the Codejock installation routine from the .\dev\sig\Installs directory Current version number is 13.2.1
Workspace Installation Next we need to copy over all directories to your development area. Run Visual Dataflex Studio 16.n and open the Sig Codejock Training 16.n workspace Add the Sig Codejock Classes v1 library Compile and run the Order sample Explain the sws files
Getting Started Training First we need to make some changes to the your Program Delete the following lines Use DfAllent.pkg Use Dftimer.pkg Use cCJStandardCommandBarSystem.pkg Add the following Use OrderPrecompile.pkg Review the OrderPrecompile.pkg Changing your Program Deletion of use packages Review the changes made to the OrderPrecompile.pkg
Getting Started Training After the Application Object add the following Object oSkin is a cCJSkinFramework Set psSkinFile to "Office2007.cjstyles" Set psSkinIni to "NormalBlue.ini" End_Object
Getting Started Training Change the Command bar system class in the Main application Panel to read cSigCJCommandBarSystem
Getting Started Training Now we need to make some minor changes to the Client Area Object oClientArea is a ClientArea Set Color to clWhite Set Bitmap to "logo.bmp" Set Bitmap_Style to Bitmap_Center
Getting Started Training Compile, run and review Open some views What has changed? You should know see that the client area has a background Open some of the views We now have a standard framework with skinning and Tab views Now you can see how easy it is to change the look and feel of an application without doing a lot! You should consider what would be the best look and feel of your application.
Getting Started Training
Getting Started Questions?
Docking Pane Training 1. Functionality 2. Sig Class features 3. Create simple panes 4. Explore the features!
Docking Pane Training – Functionality Xtreme DockingPane™ 2012 provides Windows developers with a sophisticated style docking pane. Windows developers can easily create tear off tabs and auto hide windows that allow for a more manageable application workspace. The docking panes comes with built in theme support that will allow you to choose from predefined themes such as Visio and Visual Studio .NET, or create your own custom theme. General Features Theme Support Tab Customization Auto Hide Panel Customization Load and Save State
Docking Pane Training – Sig Features Standard supported options Label Icons and Images Sticker Style Themes Location Floating panes Pinned panes Save layout for each user
Docking Pane Training – How Add a pane toolbar Created a container pane package Add the docking panes – each pane requires a unique number for the Save layout option to work, so to make things easy, our suggestion is to create an Enum_List Enum_List Define C_Pane_None Define C_Pane_Property_Grid End_Enum_List Add the above to the top of your Program In order to get docking panes in are application there a few things we need to do.
Docking Pane Training –Toolbar Add the following toolbar to the program just before the StatusBar. Object oDockingPaneBar is a cCJToolbar Set psTitle to "Docking Pane Toolbar" Object oPropertyGrid_Menu is a cCJMenuItem Set psCaption to "Property Grid" Set psToolTip to "Property Grid" Set psDescription to "Property Grid" Set psImage to "Configure_16.ico" Procedure OnExecute Variant vCommandBarControl Send ShowPane of oDockingManager C_Pane_Property_Grid End_Procedure End_Object This is really must for docking panes; as you can close them, you’ll need away of displaying them again.
Docking Pane Training – Container Just before the Client area add the following code Object oPropertyGrid_Container is a cSigCJDockingPane_Container Set Border_Style to Border_Dialog Set Location to 2000 2000 Set Size to 66 206 Set peAnchors to anAll Set Color to clFuchsia End_Object We need to have a container to place any DataFlex components within it. You just can’t drop any component onto an Active X control.
Docking Pane Training – Docking Just before the Client area add the following Docking Manager and Pane code Object oDockingManager is a cSigCjDockingManager Set psPX_Tag to "Docking Manager“ Object oPropertyGrid_Pane is a cSigCjDockingPane Set psTitle to "Property Grid" Set psImage to "Configure_16.ico" Set phoClientObject to (oPropertyGrid_Container(Self)) Set peLocation to OLEDockRightOf Set piId to C_Pane_Property_Grid End_Object // oPropertyGrid_Pane End_Object // oDockingManager Compile, run and review We need to add the Docking Pane area code, in this case we don’t want the code in the client area as the framing and sizing of the client area will not work correctly. Within the docking pane we need to add the pane itself that going to hold your data.
Docking Pane Training – Explore Lets changed the Toolbar button so it’s not active all the time Change the following Menu item property Set pbActiveUpdate to True Add the following Function Function IsEnabled Returns Boolean Boolean bStatus Get IsPaneClosed of oDockingManager C_Pane_Property_Grid to bStatus Function_Return bStatus End_Function Compile, run and review
Docking Pane Training – Explore
Docking Pane Training Questions?
Property Grid Training 1. Functionality 2. Sig Class features 3. Create simple grid 4. Explore the features!
Property Grid Training – Functionality Xtreme PropertyGrid™ 2012 provides Windows developers with a sophisticated style property grid. Windows developers can easily create a hierarchical list of editable properties and represent any data type or sub-item. The property grid comes with a built in toolbar for easy sorting and grouping, and a help panel to display information on each selected item. General Features Built in Data Types Customization Theme Support
Property Grid Training – Sig Features Standard supported options Data aware Label Icons and Images Grid Categories Grid Items Item Button Expand Button Combo form Spin form Slider Spin and Slider
Property Grid Training – How There are so many options! In the Program where you have placed the Object oPropertyGrid_Container is a cSigCJDockingPane_Container Replace the object with following Use oPropertyGrid_Container.pkg Compile, run and review Open the Use oPropertyGrid_Container.pkg package. Go through the package
Property Grid Training – Explore To use the Slider make the docking pane wider.
Property Grid Training Questions?
Task Dialog Training 1. Functionality 2. Sig Class features 3. Create simple dialogs 4. Explore the features!
Task Dialog Training – Functionality Xtreme Controls™ 2012 provides Windows GUI software engineers with numerous MFC components that have been thoroughly designed and tested. This comprehensive set of object-oriented components has been designed to handle most any GUI application development requirement. Task Dialogs (messages)
Task Dialog Training – Sig Features Standard supported options Sig versions for all the DF Box type dialogs Icon and Images Radio buttons Hyperlinks Sub Text Progress bar Automatic Word wrap (no more \n!)
Task Dialog Training – How Add the Task Dialog Object Create a test view
Task Dialog Training – Coding Add the following to the Client Area object in the Program Use oSigCJTaskDialog.pkg Now create a new view and add five buttons to it with the following Labels YesNo YesNoCancel Info Warning Stop
Task Dialog Training – Coding In the OnClick procedure add the following YesNo Integer iResult Get sigYesNo_Box "Humbugs!" "Hello World" 0 to iResult YesNoCancel Get sigYesNoCancel_Box "Humbugs!" "Hello World" eBtn_Cancel to iResult Info Send SigInfo_Box "Humbugs are great, so you think you can program!" "Hello World" Warning Send SigWarning_Box "Humbugs are great, so you still think you can program!" "Hello World" Stop Send SigStop_Box "Humbugs, you can program!" "Hello World"
Task Dialog Training – Coding Compile, run and review Try adding a lot of text to a message Try adding a lot of text to one of the boxes
Task Dialog Training – Explore Lets add the Sig demo view SigCJTaskDialogDemo Compile, run and review
Task Dialog Training – Explore
Task Dialog Training Questions?
Monthly Calendar Training 1. Functionality 2. Sig Class features 3. Create simple dialogs 4. Explore the features!
Monthly Calendar Training – Functionality Xtreme Controls™ 2012 provides Windows GUI software engineers with numerous MFC components that have been thoroughly designed and tested. This comprehensive set of object-oriented components has been designed to handle most any GUI application development requirement. Month Calendar
Monthly Calendar Training – Sig Features Standard supported options Show today Week numbers Start of the week Show/Hide buttons Show/Hide borders Multi month grid
Monthly Calendar Training – How Make some changes to Order view Change a date field to popup the calendar Sub class dbForm
Monthly Calendar Training – Coding Add the following to the Order.vw Use SigCJMonthCalendar.sl Find the date field oOrderHea_Order_Date and do the following Change the class from dbSpinform to dbForm Add Set Prompt_Button_Mode to PB_PromptOn Add Set Prompt_Object to oSigCJMonthCalendar_Lookup Compile, run and review
Monthly Calendar Training – Coding To improve this we need a sub Class, in the Order view Remove Use SigCJMonthCalendar.sl Add Use cSigCJdbForm.pkg Find the date field oOrderHea_Order_Date and do the following Set Prompt_Button_Mode to PB_PromptOn Set Prompt_Object to oSigCJMonthCalendar_Lookup Change the class to cSigCJdbForm Compile, run and review
Monthly Calendar Training – Explore Lets add the Sig demo view SigCJMonthCalendarDemo Compile, run and review
Monthly Calendar Training – Explore
Monthly Calendar Training Questions?
Report Control Training 1. Functionality 2. Sig Class features 3. Create simple data view 4. Explore all the features!
Report Control Training – Functionality Xtreme ReportControl™ 2012 provides Windows developers with a sophisticated styled Report. Windows developers can easily create group and sort data in a flat or hierarchical format. All colours in the reports can be customized to match any existing application. General Features Report Column Features Report Grid Lines Report Cell Types and Features Report Cell Attributes
Report Control Training – Sig Features Database support Text files Dataflex SQL, including options for both Dataflex and MerTech drivers DDO can automatically create columns In SQL mode will automatically create SQL scripts Eval and SQL Case Build your own SQL scripts RowId mode Show recnum Table index Active Track Changing Tables at runtime! Field Chooser Save and load layout
Report Control Training – Sig Features Format support Colour control Foreground, background Field types String, Text, Integer, Real, Decimal, Currency Date, Datetime, Datetime(string), Time Styles Standard, Checkboxes Alignment Automatic including Word Wrap on text fields
Report Control Training – Sig Features Standard supported options Icons and Images column, row, item Show Grouping box (true by default) Max number rows Row count Ascending, Descending Row colours Bug tracking help ptsTimeSpan_Load ptsTimeSpan_SQL Double Click Right Click (Context menu)
Report Control Training – Sig Features Context menu Rebuild Refresh Field Chooser Default Layout Select All Deselect All Invert Selection Preview Report Print Report Export to CSV Process selected rows
Report Control Training – Sig Features Developer events hooks OnSetColumnFormats OnDefine_Columns OnCreateColumn Integer iColumn Handle hoCol OnCreateRowItem Integer iColumn Handle hoItem String sValue OnBefore_Load_Data OnAfter_Load_Data OnBuild_SQL_Statement OnOpen_DataSource (Text files only) OnClose_DataSource (Text files only) OnSetRowColor Integer iColumn String sValue OnActive_Track String sID OnProcess_Rows String sID OnProcess_Rows_RowID RowID Row_ID OnDouble_Click String sID OnDouble_Click_RowID RowID Row_ID Developer events hooks OnSetColumnFormats fired from Initialise_Column_Formats OnDefine_Columns fired from DoDefine_Columns OnCreateColumn Integer iColumn Handle hoCol fired from Create_Columns OnCreateRowItem Integer iColumn Handle hoItem String sValue OnBefore_Load_Data OnAfter_Load_Data fired from DoLoad_Data OnBuild_SQL_Statement Get psSQL_Select to sSQL_Select Get psSQL_From to sSQL_From Get psSQL_Where to sSQL_Where Get psSQL_OrderBy to sSQL_OrderBy Get pbSQL_Case to bCase OnProcess_Rows String sID OnProcess_Rows_RowID RowID Row_ID fired from Process_Rows OnActive_Track String sID OnDouble_Click String sID OnDouble_Click_RowID RowID Row_ID
Report Control Training – Sig Features Standard Methods Reset_Data_Properties Resync_to_Focus_Row Find_Row_Tag String sValue
Report Control Training – Simple view Create a view based on the Codejock Report Control View Add the Order Detail Table to the view and make it the main DDO Select and Drag the Report Control onto the view Set pbAuto_Columns to true Compile, run review Setting the pbAuto_Columns to True, allows us to just build the whole table Review notes Ok, Now we have created a simple List and been through the basic Functionality, we need to look at what else we can get out of this control
Report Control Training – Explore Controlling the how data is displayed Lets change a few things Set pbAuto_Columns to False Add the following Procedure OnDefine_Columns Send Add_Report_Column "Order" 80 eRC_Integer eRC_Standard "OrderDtl.Order_Number" Send Add_Report_Column "Line" 80 eRC_Integer eRC_Standard "OrderDtl.Detail_Number" Send Add_Report_Column "Item" 100 eRC_String eRC_Standard "OrderDtl.Item_ID" Send Add_Report_Column "Qty" 80 eRC_Integer eRC_Standard "OrderDtl.Qty_Ordered" Send Add_Report_Column "Price" 80 eRC_Currency eRC_Standard "OrderDtl.Price" Send Add_Report_Column "Line Total" 100 eRC_Currency eRC_Standard "OrderDtl.Extended_Price" End_Procedure Compile, run and review You can now see how the control has formatted the columns
Report Control Training – Explore Lets add some parent columns Add the following Send Add_Report_Column "Sales Person" 100 eRC_String eRC_Standard "SalesP.Name" Send Add_Report_Column "Customer" 150 eRC_String eRC_Standard "Customer.Name" Send Add_Report_Column "Dated" 80 eRC_Date eRC_Standard "OrderHea.Order_Date" Send Add_Report_Column "Order Total" 100 eRC_Currency eRC_Standard "OrderHea.Order_Total" Send Add_Report_Column "!" 100 eRC_String eRC_Standard "OrderHea.Order_Total” ; “(If(OrderHea.Order_Total > 10000,'Large Order',''))" Compile, run and review
Report Control Training – Explore Time to add some colour Set pbRow_Colors to True Add the following code Procedure OnSetRowColor Integer iColumn String sValue String sColumn_Name Get psColumn_Label iColumn to sColumn_Name If (sColumn_Name = Order Total') Begin If (Number(sValue) > 5000) Set piRow_ForeColor to clFuchsia End End_Procedure Compile, run and review
Report Control Training – Explore Time to add some Icons Set pbRow_Item to True Add the following code Procedure OnCreateRowItem Integer iColumn Handle hoItem String sValue String sColumn_Name Get psColumn_Label iColumn to sColumn_Name If (sColumn_Name = “!”') Begin If (Trim(sValue) > "") Set psImage of hoItem to "FlagUK_16.bmp" End End_Procedure Compile, run and review
Report Control Training – Explore Field Chooser Property Exchange Set psPX_Tag to a unique name eg. The View label Set pbPX_Save_Layout to True Compile, run and review
Report Control Training – Explore Let’s try some of the Options RowId Option (set pbRowID_Mode to True) Double Click option Show Group Box (pbShowGroupBox) What's next Things to try!
Report Control Training – Explore
Report Control Training – Explore
Report Control Training Questions?
Other Controls Popup Control Short Cut Bar Task Panel Push Buttons Tri-State Checkbox Tree View
Other Controls Questions?
Who Contributors: Martin Pincott, Ian Smith and Peter Bragg (The Three Musketeers!)
How and Where http://www.vdfsig.co.uk http://www.codejock.com Codejock forum http://support.dataaccess.com/forums/ (Give an overview of who is using the classes, where they are and what for) The class set and sample application are available from the VDF sig web site You can get the Codejock components from The cost of the full component suite pro is: - Developer license from: $529 On Special at $397 With one year subscription from: $699 On Special at $524 Subscription renewal from: $174 On Special at $134 We’ve arranged a 40% discount on Codejock suites and components for conference attendees, details to follow.
VDF-SIG Class set Questions?