Ver Mensaje Individual
  #3  
Antiguo 24-08-2007
m8estrella83 m8estrella83 is offline
Miembro
 
Registrado: ene 2006
Posts: 58
Reputación: 19
m8estrella83 Va por buen camino
el codigo que encontre para hacerlo con un check box es el suiguiente

procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
Check: Integer;
R: TRect;
begin
if Column.FieldName = 'NombreCampo' then
begin
DBGrid1.Canvas.FillRect(Rect);
Check := 0;
if Table1.FindField('NombreCampo').AsInteger = 1 then Check := DFCS_CHECKED;
R:=Rect;
InflateRect(R,-2,-2); //Disminuye el tamaño del CheckBox
DrawFrameControl(DBGrid1.Canvas.Handle,R,DFC_BUTTON, DFCS_BUTTONCHECK or Check);
end;
end;



pero no se donde ni como modificarlo para un dblookupcombobox
Responder Con Cita