Board index » delphi » TDBCtrlGrid Containing TButton Controls

TDBCtrlGrid Containing TButton Controls

Hello
    I want to use a component like the TDBCtrlGrid to display records in a
database, i require that the user can click a button next to each record
that then brings up another form to make changes to the record. I cannot put
a TButton in a TDBCtrlGrid is there anyway arround that? Is there another
component i can use?

Thankyou

Charlie

 

Re:TDBCtrlGrid Containing TButton Controls


Quote
>    I want to use a component like the TDBCtrlGrid to display records in a
>database, i require that the user can click a button next to each record
>that then brings up another form to make changes to the record. I cannot put
>a TButton in a TDBCtrlGrid is there anyway arround that? Is there another
>component i can use?

Subclass the button and write the Constructor like this
constructor ButtonForGrid.Create(AOwner:TComponent);
begin
  inherited Create(AOWner);
  ControlStyle := ControlStyle + [csReplicatable];
end;

--
Brian Bushay (TeamB)
[email protected]

Other Threads