Author: Tomas Rutkauskas
Customizing the display of IBObject queries
Answer:
If you use IBObjects for your InterBase client application, you can use the
powerful TIB_Cursor and TIB_Query to modify how your query results will look for
example in a grid. Take a look at the sample source code below.
Note:
All those settings can be made via the object inspector, but when the SQL property
is updated at runtime with a new query, some of these properties seem to get wiped
out. Therefore it's better to set them at run-time in code.
1 2 begin3 with TIB_Query1 do4 begin5 FieldsVisible.Add('ID=F');
6 FieldsVisible.Add('SLNR=T'); { not really necessary }7 FieldsCharCase.Add('LAND=UPPER');
8 FieldsDisplayLabel.Add('COMMENTS=Your Comments');
9 FieldsDisplayWidth.Add('COMMENTS=200');
10 end;
11 end;