Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Vilhelm-Ion Praisach
  Where is Vilhelm-Ion Praisach?
 Resita
 Romania
 Vilhelm-Ion Praisach
 To: Hans Leander
  Where is Hans Leander?
 Cleveland
 Ohio - United States
 Hans Leander
 Tags
Subject: RE: Label width always 40
Thread ID: 394154 Message ID: 394158 # Views: 45 # Ratings: 3
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Tuesday, December 31, 2013 3:42:44 AM         
   


> I can't get labels to center over grids.
>
> I have the following code in a form's Init method:
>
>
.lblAddresses.Left = .grdAddresses.Left + (.grdAddresses.Width - .lblAddresses.Width)/2

>
> The equation works, and would give the correct result if it was not for the fact that, regardless of label, the label width is equal to 40 (in one case, it is actually 450).
>
> Any idea why this is happening? The correct width of the label should be "known" by the time I use it in the form's Init method!?
>
> Regards,
>
> Hans L


In addition to Mr.Glen Villar try :

.lblAddresses.Visible=.T.
.lblAddresses.Left = .grdAddresses.Left + (.grdAddresses.Width - .lblAddresses.Width)/2


My respects

ENTIRE THREAD

Label width always 40 Posted by Hans Leander @ 12/31/2013 3:09:21 AM
RE: Label width always 40 Posted by Glen Villar @ 12/31/2013 3:33:11 AM
RE: Label width always 40 Posted by Hans Leander @ 12/31/2013 4:13:25 AM
RE: Label width always 40 Posted by Vilhelm-Ion Praisach @ 12/31/2013 3:42:44 AM
RE: Label width always 40 Posted by Hans Leander @ 12/31/2013 4:14:43 AM