Some application skills for InfoPower4000 WWGRID control

xiaoxiao2021-03-06  63

Some application skills for InfoPower4000 WWGRID control

------ Working to InfoPower4000 help documentation

Yasheng

2003-12-6

The check box can be set to click or double click (default)

Property EditControlOptions: TweweditControlOptions;

Description

This Property Defines Specific Settings for Controls Embedded in An InfoPower Grid

Value meaning

EcoCheckboxSingleClick When True, The end-user nesed Only-click a checkbox cell in the grid to Toggle It. When False, a dbl-click is required.

Ecosearchownerform When True, The Grid Searches for Embedded Controls on The Grid 抯 Owner form. When False, The Grid Will Search The Grid Parent Form. Usually You Want True.

EcoDisableCustomControls if true, the Grid Will NOT USE The Assigned Custom Controls During Editing.

EcoDisableDatetimePicker If False, The Grid Will Disable The Automatic Creation and Use of the TwowdbdatetimePicker Control to Edit Dates or Time Fields.

EcoDisableEditorifreadonly If True, The Grid Will Disable The Inplace Editor If The Field Is Not Editable.

Twwdbgrid.exportOptions

Property ExportOptions: TwwexportOptions;

Description

This property defines specific settings for exporting data from the grid to a series of different file types or to the clipboard for other applications to use. Choose from HTML, formatted text, tabbed delimited text, comma delimited text (this is a common spreadsheet format known as .CSV), or the Excel SYLK (.SLK) format By setting ExportOptions |. Options | esoClipboard to True, the data will be saved to the clipboard in the chosen ExportOptions |. ExportType format If dgMultiSelect is enabled in the grid and an enduser has selected some records, then you have the choice of exporting only the selected records or the current contents of the filtered or nonfiltered dataset. Just set the options and call the save method of the ExportOptions object. GRID to save an HTML file

Saving to html file

The Following Example Demonstrates How you would save the grid data to an html file.

1. set the grid's filename property to xxxxx.html. Where xxxxx is the name of the html file you wish to generate.

2. Set The ExportOptions | ExportType to wwgetHTML

. 3. Call the Save method (ExportOptions.save) and the generated file will be created If you wish to save this to the clipboard so that you can paste the resulting HTML into Microsoft Word or Excel 2000, then set the ExportOptions | Options | EsoClipboard to True.

4. IF you want to programmatically display this with the default browser. Add shellapi to your form Uses Clause and call it like:

Shellexecute (Handle, 'Open', Pchar (WwdbGrid1.ExportOptions.FileName), NIL, NIL, SW_SHOWNORMAL);

Export Grid to Excel

Saving SELECTED DATA to Excel Using The Clipboard

The Following Example Demonstrates How you would save data to excel using the clipboard.

1. Set the ExportOptions | ExportType to wwgetSYLK You could optionally also set it to wwgetTxt for exporting just the data, or wwgetHTML (for special formatting, coloring, and for Excel 2000) .2 Set the ExportOptions |. Options | esoClipboard to True. IF you wish to export to a file set this to false and set the filename to the format xxxxx.slk.

3. Call the save method. (ExportOptions.save)

4. Open Excel and The Select Edit | Paste Or Edit | Paste Special.

Can be exported format description

TwwGridexPortType

TwwGridExportType = (wggettxt, wwgethtml, wwgetsylk, wwgetxml);

THIS TYPE DETERMINES The Actual Format That The Data IS Stored In. The Properties for this Object Are Follows:

Property Description

wwgetTxt When ExportType is set to wwgetTxt, records will be saved to the specified FileName in a Text Format, or if esoClipboard is in the ExportOptions |. Options property then the record data will be saved to the clipboard in the CF_Text clipboard format The delimiter settings Will Determine The Actual Format of The Exported Text. See The Delimiter Property for more details.

wwgetHTML This format is one of the most flexible and powerful export formats Depending on the ExportOptions |. Options settings, it is possible to preserve the colors, fonts, group headings, column widths, footers, and controls that are in the grid Save to. An HTML File and Use an Internet Browser to View The Resulting Table, or Save To The Clipboard and Paste To Microsoft Word or Excel.

wwgetSYLK Microsoft Excel supports the spreadsheet format .SLK, which can retain the current column widths and group headings, fonts that are set at the time of export Setting ExportOptions |. ExportType to wwgetSYLK will cause data to be saved in that format.wwgetXML Not Implemented YET. Provided for Future XML Exporting.

Set the color of the current record

TwwGridPaintOptions

This Class Defines How A Grid OR DataInSpector Control IS Painted. You Can Load A Background Bitmap And Have DiffERENT Sections of The Grid Be Blended with Certain Colors.

PROPERTIES

The Properties for this Object Are As Follows:

Property Description

ActiveRecordColor Set this property to define the color that the inspector or grid use to paint the background of the data cells for the active record. This defaults to clNone, which means that the color of the control is used to paint the background.

AlternatingRowColor This defines the color that the inspector or grid use to paint the background for every other row. This property defaults to clNone, which means that the row colors are not alternated. See also the property AlternatingRowRegions to configure which section will paint with the alternating Color.

AlternatingRowRegions Set this property to enable / disable the Alternating Color Support Wtem.

ArrfixedColumns Enable Alternating Colors in The Fixed Column

Arrdatacolumns Enable Alternating Colors in The Data Cells

ARRACTIVEDATACOLUMN Enable Alternating Column for the Active Record Column. This property Only Applies WHEN Using A Data Inspector. It is ignored by.

BackgroundBitmap Assign this property to enable a background tile for the inspector or grid. You should make your tiles small so that your executables do not become large. We do not recommend non-tiled backgrounds as this may slow the performance of your grid Zha painting. NOTE: WHEN USING NON-TILED BACKGROUNDS, You May Want to False. For More Information See The Property FastRecordscroll.

Data Type: TPICTURE

BackgrounddrawStyle Set this property to change the way. ..

BDSTILE PAINT The Background Bitmap as a Tile

BDSstretch Stretches the Background Bitmap INTO The Control 抯 Client Area.

BDSTopleft Paints The Background Bitmap Starting At The Top Left of The Control.

BDSCenter Paints The Background Bitmap Center Despector.

BackgroundOptions Use this property to control how and where the background bitmap is painted. You may wish to enable the blending flags as they allow your grid or inspector to provide stunning and professional visual effects.

.

Cofilldatacells When True, The Data Area is Filled with the background bitmap. set this to false to prevent the background from being used in the data area.

COBLENDFIXEDROW WHEN TRUE, The Fixed Row IS Painted with a Badeed Bitmap. The Background Bitmap is Blended With The title, or indeicatorrow.color (twoDataInspector).

COBLENDFIXEDCOLUMN WHEN TRUE, The Fixed Column IS Painted with a beded Bitmap. The Background Bitmap is Bles Blended with The title (TwwdbGrid), or CAPTIONCOLOR (TwwDataInspector).

coBlendActiveRecord When true, the active record is painted with a blended bitmap. The background bitmap is blended with the color defined by PaintOptions.ActiveRecordColor. This property is not currently supported for the TwwDBGrid.coBlendAlternatingRow When true, the alternating row color (PaintOptions.AlternatingRowColor .

FastRecordScrolling Set this to true to force the grid or inspector to repaint its whole contents after any scroll operations take place. This will reduce the performance of your control Zha painting during scrolling operations, but will ensure that your grid or inspector Zha background do not shift Position after the scrolling takes place.

Note: For many tiled backgrounds, FastRecordScrolling can be left as False as the effect of tile being shifted does not harm the visual effect of the tile If you are not using a tile, but instead have set BackgroundDrawStyle to something besides bdsTile, then you. Will Likey Want To Set FastRecordsrolling to False.

转载请注明原文地址:https://www.9cbs.com/read-111869.html

New Post(0)