<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi Hector,<br><br>> From: hfiandor@infomed.sld.cu<br>> To: lazarus@lists.lazarus.freepascal.org<br>> Date: Thu, 3 Mar 2011 17:37:18 -0500<br>> Subject: [Lazarus] a consult about Tdbf<br>> <br>> Dear List:<br>> i am working with Tdbf and i want to fix in a DBEdit control the words Yes<br>> or No.<br>> If i do it typing "yes" or "no", no problem, the DBEdit control interprets a<br>> change and the Navigator bar become Active an i can "post".<br>> <br>> but i want to do it clicking over the DBEdit.<br>> <br>> i have implemented in the DBEditClick event this procedure<br>> begin<br>> if DBEdit.text='yes' then DBEdit.text:='No'<br>> else<br>> if DBEdit.text='No' or DBEdit.text='' then DBEdit.text:='Yes';<br>> end;<br>> <div><br></div><div>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.</div><div><br></div><div>Your logic would then become:</div><div><br></div><div>Var</div><div> CheckBox1 : TCheckBox;</div><div>begin</div><div> // assign Checkbox1.Checked somewhere (true or false)</div><div> Checkbox1.Checked := not Checkbox1.Checked;</div><div><br></div><div>... is this what you are trying to do? You are really just inverting the logic of the field, correct?</div><div><br></div><div>> and the DBEdit control remain with the original field value and the<br>> Navigator bar dont get Active.<br>> <br>> thanks in advance,<br>> <br>> yours,<br>> <br>> Ing. Héctor F. Fiandor Rosario<br>> hfiandor@infomed.sld.cu<br>> </div><div><br></div><div>Best Regards,</div><div> PEW :-)</div><div><br>> <br>> --<br>> <br>> 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<br>> <br>> Infomed: http://www.sld.cu/<br>> <br>> --<br>> _______________________________________________<br>> Lazarus mailing list<br>> Lazarus@lists.lazarus.freepascal.org<br>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus<br></div> </body>
</html>