dbgird combobox width problem
From: ganesh (gsganesh_at_yahoo.com)
Date: 12/02/03
- Next message: Rene Tschaggelar: "Re: Parsing a CSV file"
- Previous message: Al Vas: "Parsing a CSV file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 2 Dec 2003 01:29:49 -0700
I've a combobox in dbgrid, when i increase the column width on runtime then
combobox also increase, but if i decrease the column width combobox is not resizing
what could be the problem
here my code
procedure TfrmDesignerExport.grdProjectDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if (EditMode in [dsEdit, dsInsert]) then
begin
if (gdFocused in State) and (Column.Field.FieldName = 'FieldName') then
begin
cbSystemFields.Left := Rect.Left + grdProject.Left + 1;
cbSystemFields.Top := Rect.Top + grdProject.top + 1;
cbSystemFields.Width := Rect.Right - Rect.Left + 1;
cbSystemFields.Height := Rect.Bottom - Rect.Top;
cbSystemFields.Visible := True;
cbSystemFields.Text := Column.Field.AsString;
end;
end;
end;
{------------------------------------------------------------------------------}
Thanks
- Next message: Rene Tschaggelar: "Re: Parsing a CSV file"
- Previous message: Al Vas: "Parsing a CSV file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|