This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C356B4.FB15D580
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
How do I find out the size (specifically width) of a listbox's =
(specifically datagrid) "viewport" where the "viewport" does not contain =
borders (Fixed3D and otherwise), scrollbars, etc. ?
Microsoft defines a "viewport" in help text for the =
"DataGrid.VisibleColumnCount" property as so: "The viewport is the =
rectangular area through which the grid is visible." Well that's =
exactly what I need but where do I get it and it's attributes?
I'm asking because I'm writing a method which fills the width of a =
DataGrid with the columns defined in the active TableStyle. The problem =
is that I can't get the width of the datagrid which does not include the =
border, scrollbars, etc. =20
I've tried the following and they all refer to the width of the =
ClientRectangle which inclues scrollbars, borders, etc.
dataGrid.Width=20
dataGrid.ClientRectangle.Width=20
dataGrid.Bounds.Width=20
dataGrid.DisplayRectangle.Width
dataGrid.Size.Width
If I allocate column widths such that the total of all column widths is =
equal to, say, dataGrid.Width, I still get a horizontal scrollbar. The =
difference between dataGrid.Width and this total of all column widths is =
the width of say a 3D border, vertical scrollbar, etc.
Any suggestions?
Kristin
Kristin Barker=20
Principal Software Engineer=20
Email: kristin_barker@natureserve.org=20
http://www.natureserve.org
------=_NextPart_000_0008_01C356B4.FB15D580
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D""><FONT face=3DArial size=3D2>How =
do I find out=20
the size (specifically width) of a listbox's (specifically datagrid) =
"viewport"=20
where the "viewport" does not contain borders (Fixed3D and otherwise),=20
scrollbars, etc. ?<BR><BR>Microsoft defines a "viewport" in help text =
for the=20
"DataGrid.VisibleColumnCount" property as so: "The viewport is the =
rectangular=20
area through which the grid is visible." Well that's exactly what =
I need=20
but where do I get it and it's attributes?<BR><BR>I'm asking because I'm =
writing=20
a method which fills the width of a DataGrid with the columns defined in =
the=20
active TableStyle. The problem is that I can't get the width of =
the=20
datagrid which does not include the border, scrollbars, etc. =
<BR><BR>I've=20
tried the following and they all refer to the width of the =
ClientRectangle which=20
inclues scrollbars, borders, etc.<BR><BR>dataGrid.Width=20
<BR>dataGrid.ClientRectangle.Width <BR>dataGrid.Bounds.Width=20
<BR>dataGrid.DisplayRectangle.Width<BR>dataGrid.Size.Width<BR><BR>If I =
allocate=20
column widths such that the total of all column widths is equal to, say, =
dataGrid.Width, I still get a horizontal scrollbar. The difference =
between=20
dataGrid.Width and this total of all column widths is the width of say a =
3D=20
border, vertical scrollbar, etc.<BR><BR>Any=20
suggestions?<BR><BR>Kristin<BR><BR>Kristin Barker <BR>Principal Software =
Engineer <BR>Email: kristin_barker@natureserve.org=20
<BR>http://www.natureserve.org </FONT></BODY></HTML>
------=_NextPart_000_0008_01C356B4.FB15D580--