分享
 
 
 

InfoPower4000 wwGrid控件的一些应用技巧

王朝delphi·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

InfoPower4000 wwGrid控件的一些应用技巧

------摘至InfoPower4000的帮助文档

叶正盛

2003-12-6

复选框可以设置为单击或双击(缺省)操作

property EditControlOptions: TwwEditControlOptions;

Description

This property defines specific settings for controls embedded in an InfoPower grid

Value Meaning

ecoCheckboxSingleClick When true, the end-user need only single-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 will want to set this property to true.

ecoDisableCustomControls If True, then the grid will not use the assigned custom controls during editing.

ecoDisableDateTimePicker If False, then the grid will disable the automatic creation and use of the TwwDBDateTimePicker control to edit dates or time fields.

ecoDisableEditorIfReadOnly If True, then 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到HTML文件

Saving to HTML File

The following example demonstrates how you would save the grids 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);

导出GRID到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 then select Edit | Paste or Edit | Paste Special.

可以导出的格式说明

TwwGridExportType

TwwGridExportType = (wwgetTxt, wwgetHTML, wwgetSYLK, wwgetXML);

This type determines the actual format that the data is stored in. The properties for this object are as 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.

设置当前记录的颜色

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 within the grid or inspector.

arrFixedColumns Enable alternating colors in the fixed columns

arrDataColumns Enable alternating colors in the data cells

arrActiveDataColumn Enable alternating colors for the active record column. This property only applies when using a data inspector. It is ignored when using a grid.

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抯 painting.

Note: When using non-tiled backgrounds, you may want to set FastRecordScrolling to false. For more information see the property FastRecordScrolling.

Data Type: TPicture

BackgroundDrawStyle Set this property to change the way the background bitmap is drawn.

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 centered within the grid or inspector.

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.

Note: the background blending is automatically disabled when running on systems with less than 256 colors.

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 blended bitmap. The background bitmap is blended with the TitleColor (TwwDBGrid), or IndicatorRow.Color (TwwDataInspector).

coBlendFixedColumn When true, the fixed column is painted with a blended bitmap. The background bitmap is blended with the TitleColor (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) is blended with the background bitmap before it is painted into the grid or inspector.

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抯 painting during scrolling operations, but will ensure that your grid or inspector抯 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 likely want to set FastRecordSrolling to False.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有