Re:GridWidth on the fly
On Wed, 24 Jan 2001 11:06:15 -0800, "Marci Wilken" <mar...@hlyw.com>
wrote:
Quote
>I am attempting to compute the actual grid width needed for all the =
>columns so that a horizontal scroll bar is not needed and does not =
>appear;
>this is what I have been trying but it doesn't seem to work
Try something like
var x, y: Integer;
begin
x:= GetSystemMetrics(SM_CXVSCROLL) + 3;
for y:= 0 to Grid.ColCount-1 do begin
x:= x + Grid.ColWidths[y];
end;
x:= x + Grid.ColCount * Grid.GridLineWidth;
Grid.ClientWidth:= x;
Quote
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
><HTML><HEAD>
Marci, please post only plain text messages into Borland newsgroups
http://www.borland.com/newsgroups/netiquette.html
http://www.borland.com/newsgroups/guide.html
HTH
ain