Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 To: bsmsadok sadok
  Where is bsmsadok sadok?
 tunop
 Oman
 bsmsadok sadok
 Tags
Subject: RE: the not stable size of columns in a Grid
Thread ID: 310836 Message ID: 310841 # Views: 57 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Saturday, June 25, 2011 8:43:08 PM         
   


> hi,
> can some one help me !!
>
> i'm using a combox to searche Items and the result displayed in a GRID, but at any click of the mouse the colomne of
> have no stable size.
> Thank's

The columns keep their widths, unless you resize them manually by dragging the header border, or when you recreate the grid (or change recordsource). If you change the grid-recordsource with your combo, then you must reset the widths. You can save widths before a certain action, and restore them after the action.

nCol1Width = this.grid1.col1.width && save widths, you could use a loop for all columns
... && action that changes column widths
... && action that changes column widths
this.grid1.col1.width = nCol1Width && restore


Regards
Samir

ENTIRE THREAD

the not stable size of columns in a Grid Posted by bsmsadok sadok @ 6/25/2011 8:27:05 PM
RE: the not stable size of columns in a Grid Posted by Samir H. @ 6/25/2011 8:43:08 PM
RE: the not stable size of columns in a Grid Posted by Tom Saddul @ 6/26/2011 3:57:15 AM