InfoPower4000 wwGrid控件的一些应用技巧

原创 2004年09月29日 13:16:00
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /> 

InfoPower4000   wwGrid控件的一些应用技巧<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />





<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />2003-12-6





property EditControlOptions: TwwEditControlOptions;




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.






property ExportOptions: TwwExportOptions;




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.




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 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);







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


4.         Open Excel and then select Edit | Paste or Edit | Paste Special.












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.







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.


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.








webwork 标签 ww:action的使用

在使用 ww:select 标签时。 list 属性通常要获取到 Controler 中的一个集合如有一个街道的下拉框标签:         ww:select name="domain.street...
  • lanchangsheng
  • lanchangsheng
  • 2009年10月22日 11:36
  • 945

InfoPower For Delphi 2010 控件

  • 2012年02月15日 11:58
  • 12.03MB
  • 下载

InfoPower 4000 Pro for Delphi 7

  • 2008年05月15日 14:49
  • 6.73MB
  • 下载


  • 2007年11月21日 11:30
  • 6.73MB
  • 下载


  • diyangxia
  • diyangxia
  • 2015年01月13日 15:40
  • 12268


Spread的常用事件1   // 单元格编辑结束,焦点离开或者按回车键时                  比如:你要判断当前单元格输入内容是否合法。   private void fpSpread...
  • zhoubl668
  • zhoubl668
  • 2009年06月05日 11:15
  • 4941

Delphi7 InfoPower 4000控件

  • 2011年07月01日 09:58
  • 5.92MB
  • 下载

spring MVC的一些小技巧

spring MVC的一些小技巧1,在controller中获取指定name的bean/*** * * @param request * @param beanName...
  • hw1287789687
  • hw1287789687
  • 2015年04月03日 00:00
  • 1816


在Windows操作系统上,安装两个不同版本的Python解释器,假如Python3.5被安装在D:\Program Files\Python35文件夹中。你还需要把D:\Program Files\...
  • Zack1989
  • Zack1989
  • 2016年12月07日 21:39
  • 428
您举报文章:InfoPower4000 wwGrid控件的一些应用技巧