![]() ![]() ![]() The first is the OnDrawColumnCell event, which is not used to customize the drawing (the DefaultDrawing property is set to True), but only to compute the position of the check box when a cell of the corresponding field is selected: Notice that the check box is initially hidden and that the program handles several events of the DBGrid control. Object DbaForm: TDbaForm OnCreate = FormCreate object DBGridl: TDBGridĪlign = alClient DataSource = DataSourcel OnColEnter = DBGridlColEnter OnDrawColumnCell = DBGridlDrawColumnCell OnKeyPress = DBGridlKeyPress end object DBCheckBoxl: TDBCheckBox Caption = 'Senior' DataField = 'Senior' DataSource = DataSourcel ValueChecked = 'True' ValueUnchecked = 'False' Visible = False end object Tablel: TTable DatabaseName = 'DBDEMOS' TableName = 'Workers' end end This is a summary of the textual description of the form: The form displayed by the program contains only the grid and the check box. I've done this in the CheckDbg example, which uses the Workers table created in the DbAware example discussed earlier in this chapter. A simple way to do this is to place a DBCheckBox control in front of the grid when the user selects the corresponding item. Another common extension of the DBGrid control, found in many third-party components, is the use of check boxes to select the status of Boolean field values. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |