GridApp demonstrates the user interface features of Objective Grid.
When running the application you will notice the following features:
o Formatting cells
o Find and replace
o Undo and redo
o Cut, Copy and Paste
o Zooming the view
o Moving (dragging), Inserting and Removing rows or columns
o Working with base styles ("Base Styles"-worksheet)
o Changing properties. For example turning on/off the display of grid lines
o Working with several worksheets in a workbook
o Open a new window and see how changes are synchronized in the views
o Use the grid in a splitter window and split the panes
o Printing and print previewing
o Saving grid data to and loading grid data from a document
o Customizing headers, footers and page setup
o Displaying bitmaps in cells ("Welcome"-worksheet)
o Freezing rows/columns or using several row/column headers ("Base Styles"-worksheet)
o Covering cells (one cell can span neighboring cells) ("Welcome"-worksheet)
Special Objective Grid concepts that the GridApp sample demonstrates are:
o Subclassed controls (e.g. an ownerdrawn combobox as cell, "Controls"-worksheet)
and any CWnd-derived class can be used in the grid,
o The grid can be used to browse any external data source (i.e. dbase files)
o The grid can be used as a dialog control in a CDialog
o The grid can be used as a dialog control in a CFormView with printing support
If you are executing the GridApp sample on a Japanese Windows 95, you may
also use the IME window to enter Japanese characters. Objective Grid fully
supports international character sets.
Running the application
-----------------------
When you startup GridApp, a dialog box is displayed.
This dialog gives you following options:
o GRIDAP Document. This will display a workbook with several worksheets.
o CSample1FormView. This will display the grid as dialog control in a form view.
o Dbase Browser document. This will display the grid connected with an Dbase-file.
After clicking this option, an "Open"-dialog will be displayed where you can
select a dbase file you can the browse in the grid.
GRIDAP Document
---------------
When you select "GridAp Document", a workbook with several worksheets is displayed,
each demonstrating some features of Objective Grid. At this point you might want
to see if you can find all of the Objective Grid user-interface features previously
mentioned. Each worksheet is a different view. If you want to examine the code,
you should know that the class names for the views are numbered from
CGridSampleView, CGridSample2View to CGridSample7View (and live in the source
files gridsvw.cpp to gridsvw7.cpp) in the order they appear on the tab beam.
Each worksheet has a header with a yellow background at the top-left cell
which highlights certain features available for that worksheet.
Some features found in all worksheets are:
Enter text in cells; Zoom the views; Find/replace text; Print the grid,
change the printer settings, header/footer and print preview;
Serialize all changes to a document (all worksheets and their individual
printer setting will be serialized); Cut, copy and paste cells; Make cells
left-aligned, centered or right-aligned by clicking on the toolbar buttons;
Make cells bold, cursive or underlined by clicking on the toolbar buttons.
HereÆs how to find some of the non-intuitive features:
o Select a whole row or column and then click again on the selected row
or column and drag it to a new destination.
o Double-click on the tabs in the tabbar to change the worksheet name.
o Open a splitter view for the active worksheet with View|Splitter.
o Select cells and then format them with Format|Cells.
o Change the default style for all cells with Format|Styles and then
double-click on Standard in the listbox.
o Insert rows or columns with Edit|Insert Row and Edit|Insert Column.
o Undo commands with <CTRL>+Z and redo commands with <CTRL>+R.
o Select cells and adapt the cells size to their contents with
Format|Resize Columns or Format|Resize Rows.
o Customize the general layout of the view (grid lines color,
background etc.) with View|Properties.
o Open a second view with Window|New Window. If you have two views to
the same document, both views are synchronized. In other words,
when you change a cell, the second view is automatically updated.
o Hide rows or columns by clicking on a grid line in the header area
and dragging it until the row height or column width is zero. When
you double-click on the grid line of a hidden row or column the
row/column will be unhidden.
o Select whole rows or columns and freeze them with View|Freeze Rows
or View|Freeze Columns.
o Select several cells and define a covered cell with View|Cover Cells.
CSample1FormView
----------------
When you select the "CSample1FormView" tab, a form view (CFormView derivative)
is displayed with a grid as dialog control in the form view.
Some features are:
Change text in the grid; Resize rows and columns; Select cells; Change printer settings,
as well as the header and footer; Print and print preview the grid
Dbase Browser document
----------------------
When you select the "Dbase Browser document" tab, an "Open"-dialog is displayed
that allows you to select a dbase file to browse.
HereÆs how to find some of the features:
o Select a whole column, click again on the selected column and drag it to a new destination.
o Select full rows or columns (selecting cells is disabled).
o Change the default height for all rows by changing one row's height.
o Undo/Redo.
o Copy rows to the clipboard.
o Print, Print Preview, header/footers.
o Serialization.
o Find and replace.
o Split the view.
o Change the general layout of the grid with View|Properties.
o Change the base styles for numeric, string or date values with Format|Styles.
o Open a second view with Window|New Window. If you have two views of the same document, both views are synchronized. In other words, when you change a cell, the second view is automatically updated.