I have found that I often wish to see a set of data as either a form or a table/grid. TheInfoView control is being developed to support that goal while allowing for other views to be addedin the future as I find a need for them.
If row or column resizing is on, drag when sizing arrows show to resize column. Also note that sizing can be on the entire grid or just the headers.
You can select by either using shift with the navigation keys, shift clicking, or dragging around cells.
You can select by either using shift with the navigation keys, shift clicking, or dragging around cells.
You can select by either using shift with the navigation keys, shift clicking, or dragging around cells.
The viewer is designed to be highly extensible and configurable. It accomplishes this in a several ways.
1st IVBase contains Views implemented as iExtend. One view is active at a time. Table, Form, and Card views currently exist. Other views may be implemented as well.
2nd IVBase, IVTable, IVForm, and IVCard contain Extensions implemented as iExtend. Extensions are user supplied code that can either preempt existing functionality or add new functionality. Example usage scenarios would be to extend keyboard handling or implement drag and drop or respond to additional windows events.
3rd layouts are managed via an iLayout that double as a renderer. The current layouts are sequential, flow, simple, and positioned. Sequential lays out cells horizontally or vertically. Flow lays out uniform cells either down/right or right/down. Cells may either be evenly distributed, x cols/rows, or fixed in size. Simple allows laying out multi-line forms by placing fields either relatively or using a fixed size. Positioned allows placing fields at a specific location and may be anchored on the left, top, right, or bottom.
4th each part is rendered using an iRender. There are several existing renderers:
With the multi-renderers, adding RenderFill and RenderOutline to a RenderCompound would allow you to draw an outlined rectangle. Adding two different colored FillRect's to a Rows would allow you to achieve alternating rows. Placing layout renderers allow you to achieve a specific layout within a region.
In addition iRender has been designed to be easy to implement. Simply create a class and implement the Render method to fill in the supplied rectangle and you can use it the same as the supplied renderers. There are generally two types of renderers, fillers and drawers. Fillers cover the rectangle with something. drawers render some detail into the rectangle but don't nesassarily fill them in. There are also generally two types of drawers: constant drawers and value drawers. To implement a value drawer, add an iValue interface. Value drawers may also implement iAlign. Constant drawers tend to add a decoration, while value drawers tend to render content.
5th each rendering part generally allows for 3 separate renderers: Normal, Selected (the way a selected part is rendered), and Hot (the way the part under the mouse is rendered).
6th user DrawOverride allows the user to change the value or renderer in any way (including replacing them) as well as choosing to perform their own rendering in place of the supplied renderer. Each rendered part allows for independent overriding. The user can change values for the renderer, substitute a different renderer, or take over and actually perform the rendering.
7th IVBase is a "Virtual" control meaning it does not directly store any data. Instead information is rendered from an iDataSource. This has been designed to be easy to implement for whatever way you store your information. It simply asks for the information at a row and column and you supply the value. Included is a DataTable, DataView, DataSet for storing data in a general way along with an iDataTableDataSource that can be used with IVBase. There is also a sample of loading it from a tab delimited text file and it can also be used to temporarily store information from databases or other sources such as WMI. The sample datasources also support pivoting the data to change the presentation.
8th parts allow one or more drawing overrides. In addition to having a default renderer, specific rows or columns may have either the background and/or the content overridden.