in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

RenderDirectRichText: how do I get the size of the text

Last post 01-17-2008 8:20 AM by jorbjo. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 01-17-2008 8:20 AM

    • jorbjo
    • Not Ranked
    • Joined on 07-12-2007
    • Posts 2

    RenderDirectRichText: how do I get the size of the text

    I have used the "classic" print in a report to print RTF texts from a datatable. I need to know how big the rendered text is to know where i should print the next one.

    dim height as double

    dim size as MeasureInfo

    size = .RenderDirectRichText(30, height, strText, 190)

    height += size.HeightUnit.Value

    size = .RenderDirectRichText(30, height, strText2, 190)

    height += size.HeightUnit.Value

    I moved my sulotion to a new laptop (with windows vista) and upgraded my sulotion to VS2008.

    When I try to open the form in the designer Visual Studio crashes. I upgraded from the Classic PrintDocument and PrintPreivew to the "new" controls.

    I noticed that .RenderDirectRichText has been converted to a Sub, ie is no longer returning a Measureinfo.

    Question 1:

    How do I get the size of the text that has been rendered?

    Question 2:

    Is there a way to check what the size will be before I render the text? I want to see if the text will fit on the page or if I should do a NewPage before I render this text. 

     

Page 1 of 1 (1 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.