Hi Hector,

> From: hfian...@infomed.sld.cu
> To: lazarus@lists.lazarus.freepascal.org
> Date: Thu, 3 Mar 2011 17:37:18 -0500
> Subject: [Lazarus] a consult about Tdbf
> 
> Dear List:
> i am working with Tdbf and i want to fix in a DBEdit control the words Yes
> or No.
> If i do it typing "yes" or "no", no problem, the DBEdit control interprets a
> change and the Navigator bar become Active an i can "post".
> 
> but i want to do it clicking over the DBEdit.
> 
> i have implemented in the DBEditClick event this procedure
> begin
>     if DBEdit.text='yes' then DBEdit.text:='No'
>     else
>     if DBEdit.text='No' or DBEdit.text='' then DBEdit.text:='Yes';
> end;
> 
I think I follow your logic & it seems to me that you'd be better off using a 
TCheckBox and checking and assigning the .Checked property.
Your logic would then become:
Var   CheckBox1 : TCheckBox;begin  // assign Checkbox1.Checked somewhere (true 
or false)  Checkbox1.Checked := not Checkbox1.Checked;
... is this what you are trying to do? You are really just inverting the logic 
of the field, correct?
> and the DBEdit control remain with the original field value and the
> Navigator bar dont get Active.
> 
> thanks in advance,
> 
> yours,
> 
> Ing. Héctor F. Fiandor Rosario
> hfian...@infomed.sld.cu
> 
Best Regards,   PEW  :-)
> 
> --
> 
> Este mensaje le ha llegado mediante el servicio de correo electronico que 
> ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
> Nacional de Salud. La persona que envia este correo asume el compromiso de 
> usar el servicio a tales fines y cumplir con las regulaciones establecidas
> 
> Infomed: http://www.sld.cu/
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
                                          
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to