VFP8 SP1 on XP Pro SP1
I have a form with a grid on it. In code, the grid is
configured to display the contents of a table that is
selected by the user. Part of this configuration process
is to use checkboxes for fields that are logicals. Using
code like this:
WITH myGrid.Columns[curCol]
.AddObject("chkVal","CHECKBOX")
.CurrentControl = "chkVal"
.Sparse = .F.
.chkVal.Caption = ""
.AutoFit()
ENDWITH
This works fine with the exception of the call to AutoFit().
The column's width remains much wider that required for the
header caption or the checkbox. Refreshing the grid does not
help. Nor does removing the default "Text1" control in
the column before calling AutoFit(). Nor does reducing the
Width property of the chkVal checkbox to 30.
Is there something else that needs to be done to get this to
work? I am successfully using AutoFit() on other columns
that just have the default textbox in them, but when the
checkbox is substituted, it's not workin'.
-- TRW
_______________________________________
t r w 7
at
i x dot n e t c o m dot c o m
_______________________________________