Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Problem: Markup + FontSize
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem: Markup + FontSize

 Post Reply Post Reply
Author
Message
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Topic: Problem: Markup + FontSize
    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)

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.