Columns Width

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Milan Bacik
Posts: 28
Joined: Fri 28 Apr 2006 08:59
Location: Czech Republic
Contact:

Columns Width

Post by Milan Bacik » Fri 18 Dec 2009 13:08

I have problem with width of columns in CRDBGrid. I have data in TOraQuery with fieldnames same as in database. CRDBGrid is set to stretch columns. I set Field->DisplayLabel to localized string. If the localized string and data in column are short and fieldname is long the column is wide to display fieldname. I know TCRDBGrid is not suportet anymore, but maybe the problem is in way I use it :)

Code: Select all

for (int i = StartPoz; i Fields->Fields[i]->DisplayLabel = GetLocalizedDisplayName(pSet->Fields->Fields[i]->FieldName);
  TColumn *pCol = DBGrid1->Columns->Add();
  pCol->FieldName = pSet->Fields->Fields[i]->FieldName;
}

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 21 Dec 2009 09:06

You cannot control the width of columns when Stretch = True.

Post Reply