Ver Mensaje Individual
  #3  
Antiguo 14-08-2012
CSIE CSIE is offline
Miembro
 
Registrado: feb 2008
Ubicación: Universo paralelo
Posts: 69
Reputación: 17
CSIE Va por buen camino
Ejemplo de uso:

Código Delphi [-]
procedure TFieldFrm.GridFieldEditorCreate(Sender: TObject; ACol, ARow: Integer;
  var AEditor: TWinControl);
begin
  if ACol=1 then
    case ARow of
    2, 3, 4, 6, 12, 18, 21, 25: AEditor := TCheckBox.Create(nil);
    1, 27:
      begin
        AEditor := TMemo.Create(nil);
        TMemo(AEditor).ScrollBars:= ssVertical;
      end;
    7, 8, 9, 19, 26: begin
        AEditor:= TComboBox.Create(nil);
        if (ARow <> 9) and (ARow <> 26) then TComboBox(AEditor).Style := csDropDownList;
       end;
    10, 13, 14, 15:
      begin
        AEditor:= TSpinEdit.Create(nil);
        TSpinEdit(AEditor).AutoSize := false;
        TSpinEdit(AEditor).OnChange := OnSpinEditChange;
      end;
    else
      AEditor := TEdit.Create(nil);
    end;
end;
Responder Con Cita