Print Preview ActiveX Active Users: 66 / Visits Today: 181
Highest Active Users: 104
Print Preview ActiveX
Home | Profile | Register | Active Topics | Members | Search | FAQ | RSS
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Print Preview
 Help file
 AddTextAt - Method
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic: AllowPrinterDialog - Property Topic Next Topic: AddStyle - Method  

emiel
Administrator

Belgium
327 Posts

Posted - 07/13/2005 :  12:54:46  Show Profile
Method AddTextAt

Action:

This Method adds text to the preview window at the specified position. If cm or inches are used, a recalculation to twips will happen.

Syntax:

AddTextAt ( strText As String, vXpos As Variant, vYpos As Variant, cAlign As HorizAlignType )
Parameter   opt/req  Description                  
  • strText Optional Text to be displayed
  • vXpos Optional Starting X position in twips
  • vYpos Optional Starting Y position in twips
  • cAlign Optional Selects alignment
    The cAlign parameter can contain the following values or represented by the constants :
    
    Constant    Value   Description           
    
  • prLeft 0 Left alignment
  • prRight 1 Right alignment
  • prCenter 2 Center alignment
    Remarks:

    The text specified by strText is displayed using the specified point vXpos and vYpos as a reference position. If the vXpos or vYpos parameter is missing, then the value of CurrentX or CurrentY is used.

    In case of use of prLeft (the default value), the text is set to the right of this point.

    In case of use of prRight, the text is set to the left of this point.

    In case of use of pcCenter, the point specifies the midpoint where the text is to be centered.

    After the call to AddTextAt the value of CurrentY is advanced for the convenience of previewing several lines of text as a block. CurrentX remains unchanged after the completion of this method.

    The parameter strText can be omitted in which case the effect is to advance CurrentY to create a blank line like vbLf.

    The variants vXpos and vYpos can not contain boolean values.

    If the paper-orientation is set to landscape, and the textline is longer than paperwidth this textline will not be printed, however in portrait setting the textline will be printed and will run over the right margin.

    Example:

    To add a text at a specified position:

    vXpos = Preview.C_Twips("1.5 in")
    vYpos = Preview.C_Twips("1 in") 
    Preview.AddTextAt "Here is a line to be displayed", vXpos, vYpos
    or :

    Preview.AddTextAt "Here is a line to be displayed", 1000, 2000
    Preview.AddTextAt "Here is a line to be displayed", "1.5 in", "2 in"
    Preview.AddTextAt                      ' a blank line
    Preview.AddTextAt "Here is a line to be displayed", "1.5 cm", "2 cm"
    Come and visit :
    www.immoassist.com
    www.ppreview.net
    www.vbdiamond.com
    www.d2dsources.com
    www.mandix.com


    Edited by - emiel on 07/27/2005 12:38:30
    Go to Bottom of Page
      Previous Topic: AllowPrinterDialog - Property Topic Next Topic: AddStyle - Method  
     New Topic  Topic Locked
     Printer Friendly
    Jump To:
    Print Preview ActiveX © Mandix Go To Top Of Page
    This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.02