Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Mohammad Irfan
  Where is Mohammad Irfan?
 karachi
 Pakistan
 Mohammad Irfan
 Tags
Subject: RE: Columns with equal width
Thread ID: 396164 Message ID: 396174 # Views: 50 # Ratings: 3
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Thursday, January 23, 2014 9:11:35 AM         
   


> Dear Experts,
>
> Please give me a hint to set columns' width in a Grid equally divided, width(space) of grid by number of columns.
> (not asking about Autofit)
>
>
> Thanks alot.
> IRFAN


You can use the SetAll() method, where yourGrid.SetAll() would affect the (columns of the) single grid (and Form.SetAll() would affect all columns in all Grid controls on the Form or inside containers that belong to the Form hierarchy),
grid.SetAll("Width", m.lnColumnWidth , "Column")


Where, if I got your description right and if grid.RecordMark=.F. And grid.DeleteMark=.F., lnColumnWidth would probably be something like
lnColumnWidth = (grid.Width - SYSMETRIC(5) - grid.GridLineWidth * grid.ColumnCount) / grid.ColumnCount




hth
-Stefan

ENTIRE THREAD

Columns with equal width Posted by Mohammad Irfan @ 1/23/2014 7:53:29 AM
RE: Columns with equal width Posted by David Mustakim @ 1/23/2014 8:15:27 AM
RE: Columns with equal width Posted by Stefan Wuebbe @ 1/23/2014 9:11:35 AM
RE: Columns with equal width Posted by Rahul Moudgill @ 1/23/2014 9:22:11 AM