Print Page | Close Window

Problem: Markup + FontSize

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=18920
Printed Date: 05 July 2025 at 4:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem: Markup + FontSize
Posted By: Albert1
Subject: Problem: Markup + FontSize
Date Posted: 08 September 2011 at 6:36am
This code will lead to wrong column caption font:
 

Private Sub Form_Load()
    Width = 8000
    Height = 4000
    With ReportControl1
        .Move 0, 0, ScaleWidth, ScaleHeight
        .EnableMarkup = True
       
        With .PaintManager
            .CaptionFont.Name = "Verdana"
            .CaptionFont.Size = 14
        End With
       
        With .Columns.Add(0, "", 100, False)
            .Caption = "<TextBlock TextWrapping='Wrap' TextAlignment='left' VerticalAlignment='Center' FontFamily='Verdana'>One</TextBlock>"
        End With
        With .Columns.Add(0, "", 100, False)
            .Caption = "<TextBlock TextWrapping='Wrap' TextAlignment='left' VerticalAlignment='Center' FontFamily='Verdana'>Two</TextBlock>"
        End With
    End With
End Sub
 
 
It should render the same: either both 8pt or both 14pt ;)
 
To get the correct font rendering I have to set the fontSize in the markup:
 

Private Sub Form_Load()
    Width = 8000
    Height = 4000
    With ReportControl1
        .Move 0, 0, ScaleWidth, ScaleHeight
        .EnableMarkup = True
        With .Columns.Add(0, "", 100, False)
            .Caption = "<TextBlock TextWrapping='Wrap' TextAlignment='left' VerticalAlignment='Center' FontFamily='Verdana' FontSize='14'>One</TextBlock>"
        End With
        With .Columns.Add(0, "", 100, False)
            .Caption = "<TextBlock TextWrapping='Wrap' TextAlignment='left' VerticalAlignment='Center' FontFamily='Verdana' FontSize='14'>Two</TextBlock>"
        End With
    End With
End Sub
 
 
still, RC version 13 or 15 have the same behavior (-:
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net