unit uViewDatosPresupuesto; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uViewBase, DB, uDADataTable, cxControls, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit, cxCalendar, cxDBEdit, StdCtrls, Mask, DBCtrls, ExtCtrls, cxGraphics; type TfrViewDatosPresupuesto = class(TfrViewBase) Bevel1: TBevel; Label5: TLabel; Label1: TLabel; Label2: TLabel; edtFechaPresupuesto: TcxDBDateEdit; Label3: TLabel; edtVigencia: TcxDBDateEdit; DADataSource: TDADataSource; eReferencia: TcxDBTextEdit; Label4: TLabel; cbTipoPresupuesto: TcxDBComboBox; eOpcion: TcxDBTextEdit; Label6: TLabel; procedure cbTipoPresupuestoPropertiesInitPopup(Sender: TObject); procedure eReferenciaPropertiesEditValueChanged(Sender: TObject); private { Private declarations } public { Public declarations } end; var frViewDatosPresupuesto: TfrViewDatosPresupuesto; implementation uses uBizPresupuestosCliente; {$R *.dfm} procedure TfrViewDatosPresupuesto.cbTipoPresupuestoPropertiesInitPopup( Sender: TObject); begin inherited; with cbTipoPresupuesto.Properties.Items do if Count = 0 then begin BeginUpdate; try Clear; Add(TIPO_COCINA); Add(TIPO_BANO); Add(TIPO_ARREGLO_C); Add(TIPO_ARREGLO_B); Add(TIPO_INCIDENCIA); finally EndUpdate; end; end; end; procedure TfrViewDatosPresupuesto.eReferenciaPropertiesEditValueChanged( Sender: TObject); begin inherited; cbTipoPresupuesto.Enabled := not (Length(eReferencia.Text) > 0); end; end.