Author: Malcolm Greene
Posted: 2004-05-15 at 06:59:36
Hi Nancy,
Thanks for taking a look at my problem! I'm going to post 2 bugs and 2
design change requests.
BUG: Grid control's Autofit() method ignores Column's Textbox .Margin
property resulting in truncated display of Textbox contents.
CHANGE REQUEST: Have the grid control's AutoFit() method take an optional
parameter indicating the amount of margin (in pixels) to add to each
column when sizing columns.
BUG (?) and/or CHANGE REQUEST: Grid cells are not completely highlighted
when a column's Textbox's .Margin is greater than 0. Rather than
highlighting the data entry region of the Textbox control, the entire
grid cell region should be highlighted.
Anyone care to comment/edit these requests before I submit them to MS
(bug reports) and to the UT (change requests).
Thanks!
Malcolm
----- Original message -----
From: "Nancy Folsom" <lists@pixeldustindustries.com>
To: profoxtech@leafe.com
Date: Fri, 14 May 2004 15:50:33 -0700
Subject: RE: Control margins used by grid AutoFit()
Hi, Malcolm-
> Thanks for the tip (re: use Textbox .Margin property) - it
> works - sort of - but I think it also uncovers an AutoFit()
> bug or two.
>
> 1. AutoFit() appears to ignore the .Margin setting and
> autosizes based on length of TextBox contents - not length of
> contents - .Margin * 2.
>
> 2. Cell highlighting within a cell with .Margin > 0 will only
> highlight the data entry area within the TextBox - not the
> entire cell.
I ran your sample. The ugliness you see in the selected cell is the
margin,
not anything to do with autofit. I'd never noticed it before but then I
never had such an obvious margin. It's ugly, for sure.
I see what you mean about AutoFit not recognizing the margin setting.
Items
are truncated. So, two things, I'd call the latter issue a bug (AutoFit
should account for margins). The issue of padding the columns a bit...It
would be nice if we could, say, pass a parameter to AutoFit that would
set a
padding amount. At this point it would seem to be your best bet to
autofit,
then go through and increment the columns by a bit--not a great solution,
but still easier than doing the whole calculation ourselves, I guess.
Let me know if you decide to post the bug and/or design change request.
If
it's on the UT, I'll vote for it.
Regards-
Nancy Folsom
Pixel Dust Industries
Author _Debugging_Visual_FoxPro_Applications_
http://www.hentzenwerke.com/catalogpricelists/debugvfp.htm
[excessive quoting removed by server]