Re : TGrid Components
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <[email protected]> |
Hello ... I dont know if this thing is going to work with Delphi 2 ... I never saw Delphi 2 and I started with Delphi 3 ... but I think that it will work ... so lets suppose that you have a TDBGrid and a TDBCheckBox ... you want to make one cell of the grid become a check box right when you click on that colom ... try this : after connecting your DBGrid and DBCheckBox to your data source regularly search for the event : OnDrawColomnCell of the DBGrid ... write a code like this for the event handler: //suppose that your colom is the 4th on in the grid if (gdFocused in State) and (Column.Index = 3) then begin DBCheckBox1.SetBounds(rect.Left+dbgrid1.Left+1, rect.Top+dbgrid1.Top+1, rect.Right-rect.Left, rect.Bottom-rect.Top); DBCheckBox1.Visible:=true; end else DBCheckBox1.Visible:=false; thats it ... just copy-paste this code to the OnDrawColomnCell Event handler. I wish that this is what you was asking for ... good luck. bye bye Tameem Bahri (Dr.T) .................................... Get your own free email account from http://www.popmail.com ------------------------ Yahoo! Groups Sponsor ---------------------~--> Free shipping on all inkjet cartridge & refill kit orders to US & Canada. Low prices up to 80% off. We have your brand: HP, Epson, Lexmark & more. http://www.c1tracking.com/l.asp?cid=5510 http://us.click.yahoo.com/GHXcIA/n.WGAA/ySSFAA/i7folB/TM ---------------------------------------------------------------------~-> CodeCoffer - new Delphi code protection Tool! http://www.delphicollection.com/public/CodeCoffer.htm --------------------------------------------------------------- Unsubscribe:[email protected] List owner:[email protected] --------------------------------------------------------------- Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/