Is this what u want ?
**************************************************
*-- Class: bgrid (e:\vfpmain\libs\bcontrls.vcx)
*-- ParentClass: grid
*-- BaseClass: grid
*-- Time Stamp: 06/11/13 02:55:01 PM
*-- Base grid for use in Eurico applications.
*
#INCLUDE "e:\vfpmain\include\generic.h"
*
DEFINE CLASS bgrid AS grid
ColumnCount = 0
FontBold = .F.
FontName = "Tahoma"
FontSize = 9
AllowHeaderSizing = .F.
AllowRowSizing = .F.
DeleteMark = .F.
Height = 50
HighlightRow = .T.
PanelLink = .F.
RecordMark = .F.
RecordSource = ""
RowHeight = 17
ScrollBars = 2
SplitBar = .F.
Width = 150
ForeColor = RGB(128,128,128)
HighlightBackColor = RGB(255,255,255)
HighlightForeColor = RGB(0,0,128)
HighlightStyle = 1
*-- XML Metadata for customizable properties
_memberdata = [<VFPData><memberdata name="release" display="Release"
favorites="True"/><memberdata name="refreshcontrols" display="RefreshControls"
favorites="True"/><memberdata name="setgrid" display="SetGrid"
favorites="True"/><memberdata name="oauto" display="oAuto"/></VFPData>]
oauto = .NULL.
Name = "bgrid"
*-- Releases a FormSet or Form from memory.
PROCEDURE release
RELEASE THIS
ENDPROC
PROCEDURE refreshcontrols
this.REFRESH()
ENDPROC
PROCEDURE setgrid
LOCAL lnTotColWidth, lnCnt, loColumn, loControl, loCtl, lnLastColumn
IF This.ReadOnly
This.SetAll("ReadOnly", .T., "Column")
ENDIF
WITH This
IF INLIST( .ScrollBars, 0, 2 ) AND .ColumnCount > 0
*** Calculate the total width of all columns
lnTotColWidth = 0
FOR lnCnt = 1 TO .ColumnCount
*** Add-on the width of this column
lnTotColWidth = lnTotColWidth + .Columns[ lnCnt ].Width + 1
*** work out if this is the last column
IF .Columns[ lnCnt ].ColumnOrder = .ColumnCount
lnLastColumn = lnCnt
ENDIF
ENDFOR
*** Add-on the width of the scroll bar (if required)
lnTotColWidth = lnTotColWidth + ;
IIF( .ScrollBars = 2, SYSMETRIC( 5 ), 0 ) + 2
*** Add-on the delete mark (if required)
lnTotColWidth = lnTotColWidth + IIF( .DeleteMark, 8, 0 )
*** Add-on the record mark (if required)
lnTotColWidth = lnTotColWidth + IIF( .RecordMark, 10, 0 )
*** Resize last column to ensure grid is completely filled
.Columns[ lnLastColumn ].Width = .Columns[ lnLastColumn ].Width + ;
( .Width - lnTotColWidth - 1 )
ENDIF
ENDWITH
ENDPROC
PROCEDURE AfterRowColChange
LPARAMETERS nColIndex
this.RefreshControls()
ENDPROC
PROCEDURE Init
this.SetGrid()
ENDPROC
ENDDEFINE
*
*-- EndDefine: bgrid
**************************************************
>________________________________
> From: Gene Wirchenko <[email protected]>
>To: ProFox Email List <[email protected]>
>Sent: Tuesday, September 17, 2013 4:26 PM
>Subject: Grids III
>
>
>Dear Vixens and Reynards:
>
> Relating to my problem with getting some grid code going, does
>anyone have any sample grid code where the grid is subclassed?
>
>Sincerely,
>
>Gene Wirchenko
>
>
>_______________________________________________
>Post Messages to: [email protected]
>Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
>OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
>Searchable Archive: http://leafe.com/archives/search/profox
>This message: http://leafe.com/archives/byMID/profox/
>** All postings, unless explicitly stated otherwise, are the opinions of the
>author, and do not constitute legal or medical advice. This statement is added
>to the messages for those lawyers who are too stupid to see the obvious.
>
>
>
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.