Dave et al

I found the answer!  Leave AutoSize=.T.   Then this works:

lblLabel.Visible = .F.
lblLabel.Caption = "My new label caption"
lblLabel.Visible = .T.

Paul

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Paul Newton
Sent: 04 March 2015 08:23
To: profoxt...@leafe.com
Subject: RE: Autosize and labels

Thanks everybody for your replies/suggestions.  Dave - I tried that directly, 
rather than in the assign method, and it still did not work ...

Paul

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Dave Crozier
Sent: 03 March 2015 16:42
To: profoxt...@leafe.com
Subject: RE: Autosize and labels

Paul,
Set autosize = .f.  then populate the label with appropriate text and then set 
autosize .T..

I subclassed the label and did this automatically on the assign method as it is 
a known problem with certain fonts/sizes and sometimes the field will autosize 
and just miss off the start/end of the label caption depending upon what fonts 
are used. If you use the assign to size the label then you can size the label 
exactly by using the sysmetric() settings  for the font you are using.

-----Original Message-----
From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Paul Newton
Sent: 03 March 2015 16:38
To: profox@leafe.com
Subject: Autosize and labels

Hi all

I have a label which is has Autosize set to .T.  but when I change the caption 
at runtime it does not resize properly - any ideas how I can force it to do so?

Many thanks

Paul Newton

[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/9a8106afb0ef9b44b69045c4448935a270bec...@nlbawexmbx1.infor.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to