Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug in the logic?
Message
 
 
To
27/09/2011 13:35:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01524938
Message ID:
01524941
Views:
83
You're missing the point. I want to center the label. After applying the changes in the caption I assume the width automatically changed due to Autosize.

>Center has nothing to do with AutoSize, which only changes the width of the label. Actually, if guess you must set AutoSize off in your case.
>
>>Hi everybody,
>>
>>I have a pageframe with many pages. In one page I want to set lbl caption in run-time and after that center that label. In Page.Activate I put this code
>>
>>LOCAL loError as Exception 
>>try
>>   this.lblPageInfo.caption = 'Component Shows for ' + thisform.oCurrentNode.Values('SeriesDescription').value
>>   this.lblPageInfo.Visible = this.lblPageInfo.Visible  
>>CATCH TO loError
>>   *
>>endtry
>>this.lblPageInfo.Left = (this.Parent.Width - this.lblPageInfo.Width)/2  
>>
>>Label AutoSize property is set to true.
>>
>>However, the label does not get centered.
>>
>>What do I miss?
>>
>>Thanks in advance.
>>
>>BTW, I think I need to drop the word 'Component' from that text.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform