InfoPower4000 wwGrid控件的一些应用技巧

Woll2WollInfoPower Woll2WollInfoPower是一套数据库开发相关的可视化VCL组件,为专业数据库开发人员设计的 C++ Builder 和 Delphi 的可视化组件。它包括数据网格控件、编辑控件、日期时间控件等。支持C++ Builder和Delphi开发环境。 立即下载
 

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.

 

 

 

 

 

 

 

InfoPower.v4000.6.FS.For.Delphi7.rar 1stClass4000forDelphi7经典界面增强控件 立即下载

相关推荐

InfoPower4000.0.6.Pro_vcl7.rar

InfoPower4000.0.6.Pro_vcl7.rar这个东西我自己喜欢用的,而且很好用的。

Twwdbgrid/Tdbgrideh 字段排序sort

    qrymt.sort:=sortstring; 这个关键执行语句  (用网格控件 关联到查询控件 是不行的 因为没有 sort 属性)    通用方法:Twwdbgrid 、Tdbgridehprocedure Tfrmtest.DBGridEh1TitleClick(Column: TColumnEh);var sortstring,fieldname:string;    Adoquery:Tadoquery;begin  adoquery:=qrytem1;                  

slindesen的专栏 1559

Delphi 13控件之InfoPower4kFlorence.exe

Delphi 13控件之InfoPower4kFlorence.exe

TwwDBGrid + TwwDBLookupCombo 下拉列表

目标标求:点击TwwDBGrid中的sPartCode字段弹出下拉列表 平台 :DELPHI 10.3 +INFO POWER 4K 20.0+WIN7 64 大致步骤: wwDBLookupCombo1,{位置任意} wwDBGrid1 object Form1: TForm1 Left = 0 Top = 0 Caption = 'Form1' ClientHeight = 418 ClientWidth = 554 Color = clBtnFace ...

男神的专栏 379

Delphi 12.3控件之InfoPower 4K v21.0.1.3-Demos.7z

Delphi 12.3控件之InfoPower 4K v21.0.1.3_Demos.7z

InfoPower4000.0.6.Pro_vcl7_Inforpower4000_

数据编程,快速简单,丰富的表格处理功能。

在Delphi中使用ShellExecute(handle, 'open', PChar(fname),nil, nil, SW_HIDE)函数应注意的问题...

在Delphi中使用ShellExecute(handle, 'open', PChar(fname),nil, nil, SW_HIDE)函数应注意的问题: 一、对一般vcl程序及isapi dll(apache isapi dll模块): ShellExecute涉及到的文件(包括执行程序和其他文件),其文件名必须使用全路径名,不能使用相对路径名! 二、对isapi dll(...

weixin_30568591的博客 563

LTspice仿真实战:共模电感差模/共模插入损耗测试全流程(附WE 744821201参数)

本文以Würth Elektronik 744821201型号共模电感为例,详细介绍了在LTspice中搭建差模与共模插入损耗测试电路的全流程。通过从规格书提取关键参数、构建SPICE模型,到执行仿真并与官方数据对比,旨在帮助硬件工程师在PCB设计前期精准预测EMC性能,弥合器件选型与系统设计之间的鸿沟。

info6的博客 758

开发复合组件TLabel + TwwDBLookupCombo

我个人就非常喜欢这套组件包,它的DBGrid(TwwDBGrid)的例可以绑入twwdbedit,twwcombobox,twwLookupcombo,twwButton 等等组件包内的其它很多自身的组件,有人说 DevExpress 也可以。Inofpower 很久也没有更新了,只是作了新版DELPHI的适配,组件的功能从D2007那些开始到现在,可以说几乎没有任何的改变;大部分的属性或者事件,都可以简单的 get、set解决;说说我踩坑(其实不算坑,只是我太菜水平有限遇到的困难,花了不小时间才解决的)

编程资料收集与共享交流 502

R语言实战:非正态数据下的Scheirer–Ray–Hare检验全流程解析

本文详细解析了在R语言中执行Scheirer–Ray–Hare检验的全流程。当数据不满足正态分布假设时,该非参数检验是传统双因素方差分析的有效替代方案。文章从原理、R环境配置、数据准备、代码实现、结果解读到事后比较与可视化,提供了完整的实战指南,帮助研究者稳健地分析多因素实验设计中的主效应和交互效应。

cc789的博客 406

在 Mac OS 上编译 WebRTC 教程

在 Mac OS 上编译 WebRTC 教程

iShare_Carlos的博客 1248

DBGridEh应用实例(来自delphi园地)

Enlib3.0组件包安装成功后,在系统的组件面板中会显示“enlib”组件包标签(如图1),添加DBGridEh到窗体的方法与其它组件一样。在窗体中添加该组件后,请跟我一起来实现图2的一些特殊效果,具体属性设置请参考属性表的说明。A、定制标题行1、制作复杂标题行 标题行可设为2行以上高度,并可以为多列创建一个共同的父标题行。为实现这个效果,需在各个列标题属性中以“|”分隔父标题和...

weixin_30275415的博客 912

从CORDIC到DDS:手把手拆解《Verilog传奇》第9章的实战项目(附可跑通的代码)

本文详细解析了如何从CORDIC算法到DDS系统的完整实现过程,基于《Verilog传奇》第9章的实战项目,提供了可运行的Verilog代码。内容涵盖CORDIC算法的硬件实现、DDS系统架构设计、完整系统集成与验证,以及实际部署中的性能调优技巧,适合数字IC和FPGA开发者深入学习。

weixin_42623010的博客 413
下一篇: 用分割DMP的方法导入和导出大型ORACLE数据库
yzsind
博客等级 码龄25年 1925粉丝 328原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值