EHLIB control information

xiaoxiao2021-03-06  91

Custom Grid Title Complex Title TDBGRIDEH allows you to create titles on multiple columns, for example:

Set the dbgrideh.usemultititle property to TRUE and populate the title of the tag or column header of the field, you can use the following rules: The text section or column header in the field tab must be composed of several parts, and use "|" split, several columns Each generic part is set to the same. Other fields or titles must contain the same text in the corresponding portion. ?

E.g:

Field1.displayLabel: = 'Title1 | Subtitle1'; Field2.displayLabel: = 'Title1 | Subtitle2'; ??? or dbgrideh.columns [0] .title.caption: = 'Title1 | Subtitle1'; dbgrideh.columns [1] .Title.caption: = 'title1 | subtitle2'; PressTle Title Set Column.title.titleButton to force the title unit to force the title unit. Write the OntitLebTnClick event to control the operation when the user clicks the title unit. ?

Display bitmap to show bitmap in Titles Instead of Caption Use TitleImnTitleEh is shown in Titles Instead of Caption Use TitleImages Property of TdbGrideh and ImageIndex Property.

Automatic with location identification sort headers. TDBGridEh allows to show special? Sortmarking bitmaps (small triangles) in the right part of title cell. In order to automatically marking title by sortmarking bitmaps add dghAutoSortMarking to OptionsEh property. Add dghMultiSortMarking too in order to allow sortmarking several columns simultaneously. Set Column.Title.TitleButton to true for titles which will have possibility to change sortmarkers at run time. At runtime clicking on title will change sortmarking. Holding Ctrl key allows to mark several columns simultaneously. After user change sormarking grid call OnsortmarkingChanged Event. You Can Write This Event to change Sorting and Reopen in DataSet. Use SortmarkedColumns Property to Access To Sortmarked Columns.

The default value of the title attribute uses TDBGRIDEH.COLUMNDEFVALUES.TITLE to set the default value of the title property.

Custom grid footer footer and statistics TDBGridEh allows to show special row (footer) or rows at bottom part. Use FooterRowCount property to specify the number of footer rows in the grid. Use Footer or Footers property of TColumnEh object to specify information which need to show in footer cells. Footers property useful then you have more then one footer rows. Footers is a collection of TColumnFooterEh objects where information from i-th aliment of collection will be show in i-th cell of footer column. in footer cell, it is possible to show:. Sum value for specified field, record count, value of a specified field or static text Use property Footer.valueType or Footers [i] .valueType to specify which type of value will be show in footer cell . If valueType = fvtStaticText, then set the property value to specify text which need to show. If valueType = fvtFieldvalue, then you need to set property FieldName to specify field, value of which need to show. to force grid to calculate total values ​​need TO ACTIVATE SUMLIST (DBGridEh.SumList.Active: = True). Set valueType to fvtSum and grid must to show sum value of the column field in the footer cell, you can also specify Column.Footer.FieldName to calculate total value of the other field Set. ValueType to fvtcount to force grid to show count of records in the footer cell.

The custom grid data unit displays the field value in the data unit as graphics. TDBGridEh allows to show bitmaps from TImageList component depending on field values ​​To show bitmaps depending on field values ​​need:. Fill list of field values ​​to Column.KeyList property (every value in separate line) and set Column.ImageList property to ImageList control that has the bitmap in according index. Set Column.NotInKeyListIndex to index of bitmap that will be shown if field's value does not correspond to any value in KeyList (for instance you can set index of image for Null field value). At run time you are not . allowed to edit bitmap in column cell Use blank key and mouse click to set next value from Column.KeyList to the field;. Shift-blank key and Shift-Mouse click to set previous value from Column.KeyList Set Column.DblClickNextval to True have allows to change value on mouse double click. check box logical and non-logical value Grid automatically shows checkboxes for boolean field. to show checkboxes for non boolean fields fill first line of Column.KeyList property that corresponds to the checked State of the Checkbox, Second Line - Non Checked State, And Set Column.checkboxes Ptoperty To True. Line of Keylist Can Represent More Than ONE VALUE IN A SEMICOLON-DELIMITED LIST OF ITEMS.

The data line is highly used by RowHeight and RowLines properties to specify high data lines. Complete data line high = line height travel height. Set RowsizingAllowed to True to allow you to use a mouse to change the row.

Setting Column.WordWrap to TRUE to make multiple lines of text in the data line. If you are high> text, it will wrap.

Display the Note field Set DrawMEMOTEXT To TRUE to display a textual note field. .

The font and color properties in the custom cell font and color TDBGRIDEH describe the fonts and colors of the cells drawn in the data grid. The Font and Color properties in TColumneh describe fonts and colors that draw cells in the specified column.

There are several events for event custom cell fonts and colors that allow you to customize cell fonts and colors before drawing cells. You can write TDBGRIDEH's OnDrawColumnCellevent event handle to draw data in the grid unit. You can use the canvaS property to draw cells. But if you just want to change the properties of the font or color, I suggest you use the following events. You can write TDBGRIDEH ONGETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCETCET to control the operations specified before drawing data units. You can change the drawing font and background colors. This event is suitable for you to use when you want to change the font or color of the whole line. If you want to change the properties of the cell in the specified column, you can use TColumneh.ongetcellparams. Write this event to control the operation when a column data unit is redrawn or edited. Before a column data unit is redrawn, you can change the drawing font, background color, alignment, image index, text, or check box. Before editing a column data unit, you can change the edit font, background color, text, or read state. ? The default value of column properties

Use the ColumnDefVALUES properties to set the default value of the column properties. The newly created column will get attribute values ​​from the ColumnDefValues ​​property, and until the first time you specify.

Place the editor in the appropriate location of the grid. Several fields are displayed in the drop-down list. Several drop-down fields are displayed in the drop-down list, you need to set the column's lookupdisplayfields property to the semicolons property of the field to split multiple field names. The property named column.field.lookupResultfield must be in the LookUpDisplayFields list. Multi-field drop-down lists can only be applied to the drop-down field.

Show the drop-down method

You can display other texts in the relevant fields through the keylist and picklist properties. Keylist displays the value contained in the field rather than the PickList index. Column.NotInKeyListIndex to index of text from PickList that will be shown if field value do not contain in KeyList (for instance you can set index of text for Null field value). Set Column.DblClickNextval to True to change value on mouse double click.

The drop-down calculator For the TDATEFIELD and TDATETIMEFIELD fields, the INPLACE editor displays the drop-down button to display the display drop-down calculator. Set column.ButtonStyle to CBSNE to disable the display drop-down button.

Setting the editor color and the font input editor can set the color and font of the data unit. The data unit uses the ONGETCELLPARAMS event to control the column color and font. The INPLACE editor is automatically set to multi-line mode when row> a row, and set the list of properties WordWrap to True.

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

New Post(0)