Data Access Worldwide Knowledge Base
Article ID 2130 Article Title HOWTO: Set FontWeight of Objects and have their label set too Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2130 KBase Category VDF (GENERAL) Date Created 05/31/2005 Last Edit Date 06/01/2005
Article Text
PROBLEM:
When I set the fontweight of my dbform object, the label is shown in the same weight but a part of the text is truncated. It looks like the size is not calculated correctly.
ANSWER:
This is one of the properties where the order in setting them is important. The fontweight must be set BEFORE the label property is being set. Since the label is set via the object properties dialog and fontweight isn't, the line "Set FontWeight To 1000" MUST be code before the green line in Code Explorer.
Set Fontweight to 700
/* DO NOT REMOVE THIS LINE: IDE GENERATED CODE WILL GO HERE */
Another solution is to set the label again. So:
/* DO NOT REMOVE THIS LINE: IDE GENERATED CODE WILL GO HERE */
Set Fontweight to 1000
Set Label To (Label (Self))
That is, of course, less elegant.
Contributed By:
Vincent Oorsprong
Company: Data Access Worldwide
email: vincent.oorsprong@dataaccess.eu
Web Site: http://www.dataaccess.eu
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.