Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 14212, GetText, SetText Example

by A. Anonymous Email: Anonymous


Download Details
FTP  download also available 0 bytes
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 1.0  to 5.0 18 downloads
Copyright: No significant restrictions


Size: 0 bytes
Updated on Mon, 03 Jan 2000 00:00:00 GMT
Originally uploaded on Mon, 03 Jan 2000 00:00:00 GMT
Description
procedure TForm1.Table1CategoryGetText(Sender: TField;
var Text: String; DisplayText: Boolean);
begin
case Sender.AsInteger of
1: Text := 'Electrical';
2: Text := 'Agricultural';
else
Text := '[Error]';
end;
end;

procedure TForm1.Table1CategorySetText(Sender: TField;
const Text: String);
begin
if Text = 'Electrical'then
Sender.Value := 1
else if Text = 'Agricultural' then
Sender.Value := 2
else
raise Exception.Create ('Error in Category field conversion');
end;

end.

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03