>David,
>
>Is there a way to get the width of the row marker other that test to see if they are turned on?
>
>Thanks
>
>>James,
>>
>>The RowMarker? The DeletedMarker? The width of the column seperators?
>>
>>>I have vertical scrool bar and sysmetric(5) gives me a value of 16 but I need to add 35 to get the propper width. What else am I missing?
Then I think RecordMark and DeleteMark is on.
Code has someassumptions like grid has at least one column and first column has default Text1 object, caller would take care setting focus back to elsewhere etc.
Lparameters toGrid, tnMax
tnMax = iif( empty(m.tnMax), ;
m.toGrid.Parent.Width - m.toGrid.Left, m.tnMax)
Local ix, tColWidth
With m.toGrid
.Columns(1).SetFocus
tColWidth = 0
For ix=1 To .ColumnCount
tColWidth = m.tColWidth + .Columns(m.ix).Width
Endfor
.Width = Objtoclient(.Columns(1).Text1,2) + ;
Sysmetric(5) + Sysmetric(10) * 2 + ;
m.tColWidth - Objtoclient(m.toGrid,2)
if .Width > m.tnMax
.Width = m.tnMax
endif
Endwith
Cetin