Change memoview text
pinbot
Texas
I think this should be easy but not working.
I'm not a pascal expert so could definately be my problem.
I'm trying to change the text of a TfrMemoView which normally displays the value of a data field. If the value is 0, I'd like to print "N/A"
I tried this
if [SOPDataSet."Occupancy"] =0 then
begin
FillColor := clRed;
Memo.Clear;
Memo.Add := '' + 'N/A' + '';
end
The background changes to red okay but the text is always blank.
TIA,
Bryan.
I'm not a pascal expert so could definately be my problem.
I'm trying to change the text of a TfrMemoView which normally displays the value of a data field. If the value is 0, I'd like to print "N/A"
I tried this
if [SOPDataSet."Occupancy"] =0 then
begin
FillColor := clRed;
Memo.Clear;
Memo.Add := '' + 'N/A' + '';
end
The background changes to red okay but the text is always blank.
TIA,
Bryan.
Comments
the memo's text is an indexed stringlist of lines.
memo1.memo.lines.clear
also watch the nuber of apostrophes used don't forget just like delphi
they get stripped.
You want to be carefull subbing Strings like 'N/A' , if the memo is not set to text only it will try to divide N by A and you will get errors.
regards