`
javawebsoa
  • 浏览: 411993 次
社区版块
存档分类
最新评论

InfoPower4000 wwGrid控件的一些应用技巧

 
阅读更多
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align="center"><b><span lang="EN-US">InfoPower4000<span style="mso-spacerun: yes"> </span>wwGrid</span></b><b><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">控件的一些应用技巧</span><span lang="EN-US"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><p></p></span></b></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: right" align="right"><span lang="EN-US">------</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">摘至</span><span lang="EN-US">InfoPower4000</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的帮助文档</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: right" align="right"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: right" align="right"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">叶正盛</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: right" align="right"><?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><chsdate w:st="on" isrocdate="False" islunardate="False" day="6" month="12" year="2003"><span lang="EN-US">2003-12-6</span></chsdate></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 1pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt"> <p class="MsoNormal" style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 0cm 0cm 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0cm 0cm 1.0pt 0cm"><span lang="EN-US"><p></p></span></p> </div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">复选框可以设置为单击或双击(缺省)操作</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">property EditControlOptions: TwwEditControlOptions;</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Description</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">This property defines specific settings for controls embedded in an InfoPower grid</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Value<span style="mso-tab-count: 1"> </span>Meaning</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b><span lang="EN-US">ecoCheckboxSingleClick</span></b><span lang="EN-US"><span style="mso-tab-count: 1"> </span>When true, the end-user need only single-click a checkbox cell in the grid to toggle it.<span style="mso-spacerun: yes"> </span>When false, a dbl-click is required.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">ecoSearchOwnerForm<span style="mso-tab-count: 1"> </span>When true, the grid searches for embedded controls on the grid</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">抯</span><span lang="EN-US"> owner form.<span style="mso-spacerun: yes"> </span>When false, the grid will search the grid parent form.<span style="mso-spacerun: yes"> </span>Usually you will want to set this property to true.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">ecoDisableCustomControls<span style="mso-tab-count: 1"> </span>If True, then the grid will not use the assigned custom controls during editing.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">ecoDisableDateTimePicker<span style="mso-tab-count: 1"> </span>If False, then the grid will disable the automatic creation and use of the TwwDBDateTimePicker control to edit dates or time fields.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">ecoDisableEditorIfReadOnly<span style="mso-tab-count: 1"> </span>If True, then the grid will disable the inplace editor if the field is not editable.</span></p> <div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 1pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt"> <p class="MsoNormal" style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 0cm 0cm 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0cm 0cm 1.0pt 0cm"><span lang="EN-US"><p></p></span></p> </div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">TwwDBGrid.ExportOptions</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">property ExportOptions: TwwExportOptions;</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Description</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 1pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt"> <p class="MsoNormal" style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 0cm 0cm 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0cm 0cm 1.0pt 0cm"><span lang="EN-US">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.<span style="mso-spacerun: yes"> </span>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.<span style="mso-spacerun: yes"> </span>By setting ExportOptions | Options | esoClipboard to True, the data will be saved to the clipboard in the chosen ExportOptions | ExportType format.<span style="mso-spacerun: yes"> </span>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.<span style="mso-spacerun: yes"> </span>Just set the options and call the Save method of the ExportOptions object.</span></p> </div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">保存</span><span lang="EN-US">GRID</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到</span><span lang="EN-US">HTML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Saving to HTML File</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">The following example demonstrates how you would save the grids data to an HTML File.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">1.<span style="mso-tab-count: 1"> </span>Set the Grid's Filename property to xxxxx.html.<span style="mso-spacerun: yes"> </span>Where xxxxx is the name of the HTML file you wish to generate.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">2.<span style="mso-tab-count: 1"> </span>Set the ExportOptions | ExportType to <b>wwgetHTML</b></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">3.<span style="mso-tab-count: 1"> </span>Call the Save method</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(</span><b><span lang="EN-US">ExportOptions.save</span></b><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)</span><span lang="EN-US"> and the generated file will be created.<span style="mso-spacerun: yes"> </span>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 | <b>esoClipboard</b> to True.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">4.<span style="mso-tab-count: 1"> </span>If you want to programmatically display this with the default browser.<span style="mso-spacerun: yes"> </span>Add shellapi to your form<span style="mso-spacerun: yes"> </span>uses clause and call it like:</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">ShellExecute(Handle, 'OPEN', PChar(wwDBGrid1.ExportOptions.Filename), nil, nil, sw_shownormal);</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 1pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt"> <p class="MsoNormal" style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 0cm 0cm 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0cm 0cm 1.0pt 0cm"><span lang="EN-US"><p></p></span></p> </div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">导出</span><span lang="EN-US">GRID</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到</span><span lang="EN-US">EXCEL</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Saving selected data to Excel using the clipboard</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">The following example demonstrates how you would save data to Excel using the clipboard.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">1.<span style="mso-tab-count: 1"> </span>Set the ExportOptions | ExportType to <b>wwgetSYLK</b><span style="mso-spacerun: yes"> </span>You could optionally also set it to wwgetTxt for exporting just the data, or wwgetHTML (for special formatting, coloring, and for Excel 2000).</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">2.<span style="mso-tab-count: 1"> </span>Set the ExportOptions | Options | <b>esoClipboard</b> to True.<span style="mso-spacerun: yes"> </span>If you wish to export to a file set this to False and set the filename to the format xxxxx.slk.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">3.<span style="mso-tab-count: 1"> </span>Call the save method.</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(</span><b><span lang="EN-US">ExportOptions.save</span></b><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><span lang="EN-US" style="mso-fareast-font-family: 'Times New Roman'"><span style="mso-list: Ignore">4.<span style="FONT: 7pt 'Times New Roman'"> </span></span></span><span lang="EN-US">Open Excel and then select Edit | Paste or Edit | Paste Special.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 1pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt"> <p class="MsoNormal" style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 0cm 0cm 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0cm 0cm 1.0pt 0cm"><span lang="EN-US"><p></p></span></p> </div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以导出的格式说明</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">TwwGridExportType</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">TwwGridExportType = (wwgetTxt, wwgetHTML, wwgetSYLK, wwgetXML);</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">This type determines the actual format that the data is stored in.<span style="mso-spacerun: yes"> </span>The properties for this object are as follows:</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Property<span style="mso-tab-count: 1"> </span>Description</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">wwgetTxt<span style="mso-tab-count: 1"> </span>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.<span style="mso-spacerun: yes"> </span>The delimiter settings will determine the actual format of the exported text.<span style="mso-spacerun: yes"> </span>See the Delimiter property for more details.<span style="mso-spacerun: yes"> </span></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">wwgetHTML<span style="mso-tab-count: 1"> </span>This format is one of the most flexible and powerful export formats.<span style="mso-spacerun: yes"> </span>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.<span style="mso-spacerun: yes"> </span>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.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">wwgetSYLK<span style="mso-tab-count: 1"> </span>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.<span style="mso-spacerun: yes"> </span>Setting ExportOptions | ExportType to wwgetSYLK will cause data to be saved in that format. </span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">wwgetXML<span style="mso-tab-count: 1"> </span>Not Implemented Yet.<span style="mso-spacerun: yes"> </span>Provided for future XML exporting.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 1pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt"> <p class="MsoNormal" style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 0cm 0cm 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0cm 0cm 1.0pt 0cm"><span lang="EN-US"><p></p></span></p> </div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设置当前记录的颜色</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">TwwGridPaintOptions</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">This class defines how a grid or datainspector control is painted.<span style="mso-spacerun: yes"> </span>You can load a background bitmap and have different sections of the grid be blended with certain colors. </span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Properties</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">The properties for this object are as follows:</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Property<span style="mso-tab-count: 1"> </span>Description</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b><span lang="EN-US">ActiveRecordColor</span></b><span lang="EN-US"><span style="mso-tab-count: 1"> </span>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.<span style="mso-spacerun: yes"> </span>This defaults to clNone, which means that the color of the control is used to paint the background.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">AlternatingRowColor<span style="mso-tab-count: 1"> </span>This defines the color that the inspector or grid use to paint the background for every other row.<span style="mso-spacerun: yes"> </span>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.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">AlternatingRowRegions<span style="mso-tab-count: 1"> </span>Set this property to enable/disable the alternating color support within the grid or inspector.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">arrFixedColumns<span style="mso-tab-count: 1"> </span>Enable alternating colors in the fixed columns</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">arrDataColumns<span style="mso-tab-count: 1"> </span>Enable alternating colors in the data cells</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">arrActiveDataColumn<span style="mso-tab-count: 1"> </span>Enable alternating colors for the active record column.<span style="mso-spacerun: yes"> </span>This property only applies when using a data inspector.<span style="mso-spacerun: yes"> </span>It is ignored when using a grid.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">BackgroundBitmap<span style="mso-tab-count: 1"> </span>Assign this property to enable a background tile for the inspector or grid.<span style="mso-spacerun: yes"> </span>You should make your tiles small so that your executables do not become large.<span style="mso-spacerun: yes"> </span>We do not recommend non-tiled backgrounds as this may slow the performance of your grid</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">抯</span><span lang="EN-US"> painting.<span style="mso-spacerun: yes"> </span></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Note: When using non-tiled backgrounds, you may want to set FastRecordScrolling to false.<span style="mso-spacerun: yes"> </span>For more information see the property FastRecordScrolling.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Data Type: TPicture</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">BackgroundDrawStyle<span style="mso-tab-count: 1"> </span>Set this property to change the way the background bitmap is drawn. </span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">bdsTile<span style="mso-tab-count: 1"> </span>Paint the background bitmap as a tile</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">bdsStretch<span style="mso-tab-count: 1"> </span>Stretches the background bitmap into the control</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">抯</span><span lang="EN-US"> client area.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">bdsTopLeft<span style="mso-tab-count: 1"> </span>Paints the background bitmap starting at the top left of the control.<span style="mso-spacerun: yes"> </span></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">bdsCenter<span style="mso-tab-count: 1"> </span>Paints the background bitmap centered within the grid or inspector.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">BackgroundOptions<span style="mso-tab-count: 1"> </span>Use this property to control how and where the background bitmap is painted.<span style="mso-spacerun: yes"> </span>You may wish to enable the blending flags as they allow your grid or inspector to provide stunning and professional visual effects.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">Note: the background blending is automatically disabled when running on systems with less than 256 colors.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">coFillDataCells<span style="mso-tab-count: 1"> </span>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.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">coBlendFixedRow<span style="mso-tab-count: 1"> </span>When true, the fixed row is painted with a blended bitmap.<span style="mso-spacerun: yes"> </span>The background bitmap is blended with the TitleColor (TwwDBGrid), or IndicatorRow.Color (TwwDataInspector).</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">coBlendFixedColumn<span style="mso-tab-count: 1"> </span>When true, the fixed column is painted with a blended bitmap.<span style="mso-spacerun: yes"> </span>The background bitmap is blended with the TitleColor (TwwDBGrid), or CaptionColor (TwwDataInspector).</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">coBlendActiveRecord<span style="mso-tab-count: 1"> </span>When true, the active record is painted with a blended bitmap.<span style="mso-spacerun: yes"> </span>The background bitmap is blended with the color defined by PaintOptions.ActiveRecordColor.<span style="mso-spacerun: yes"> </span>This property is not currently supported for the TwwDBGrid.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">coBlendAlternatingRow<span style="mso-tab-count: 1"> </span>When true, the alternating row color (PaintOptions.AlternatingRowColor) is blended with the background bitmap before it is painted into the grid or inspector.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">FastRecordScrolling<span style="mso-tab-count: 1"> </span>Set this to true to force the grid or inspector to repaint its whole contents after any scroll operations take place.<span style="mso-spacerun: yes"> </span>This will reduce the performance of your control</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">抯</span><span lang="EN-US"> painting during scrolling operations, but will ensure that your grid or inspector</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">抯</span><span lang="EN-US"> background do not shift position after the scrolling takes place.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US">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.<span style="mso-spacerun: yes"> </span>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.</span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 1pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext .75pt"> <p class="MsoNormal" style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 0cm 0cm 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0cm 0cm 1.0pt 0cm"><span lang="EN-US"><p></p></span></p> </div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p></p></span></p> <stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></path><lock aspectratio="t" v:ext="edit"></lock></shapetype>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics