Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Hans-Peter Diettrich Newsgroups: comp.lang.pascal.delphi.misc Subject: Re: A DBGrid with a clickable button Date: Mon, 13 Feb 2012 09:50:00 +0100 Lines: 23 Message-ID: <9ps3dkFn2qU1@mid.individual.net> References: <4f37e08c$0$1380$4fafbaef@reader2.news.tin.it> <4f384694$0$1389$4fafbaef@reader2.news.tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Eejhm+wxmuY9790iVI8SFwG2C8vPOuP4UOqlqdPZycHt+X8cah Cancel-Lock: sha1:FV7b+NyMeC3nlTnKujH3NWLrJOA= User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <4f384694$0$1389$4fafbaef@reader2.news.tin.it> Xref: x330-a1.tempe.blueboxinc.net comp.lang.pascal.delphi.misc:216 Stark schrieb: > I am not sure I understand your comments. I'll try to explain what I > did: In a form I have a DBGrid and a Table as Datasource. I want one of > the columns to display a button, rather then its content. So I set > DefaultDrawing to true and paint the button with DrawFrameControl. This IMO is the wrong approach. Such drawings tend to disappear almost immediately. Try to find the properties that make the control behave as you want. > The > DBGrid1 OnDrawColumnCell event is called initially when the DBGrid > associated table is opened and whenever any cell is entered or the grid > scrolled. The button shows correctly. But clicking on it, the button is > repainted pushed and does not raise if clicked again. AFAIR there exists some propery AllowAllUp (or the like). When such buttons are grouped, they can behave like radio buttons (exactly one down), or as independent up/down buttons. That's different behaviour from ordinary push buttons (OK, Cancel...). DoDi