Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Total width of grid?
Message
From
02/04/2004 02:12:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/04/2004 14:38:31
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00891539
Message ID:
00891674
Views:
19
>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.
* SetGridWidth
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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform