How to add justification correctly?

Hi Scripters,
I am new in scripting in InDesign. In my XML Import I tried to add a justification to my different textranges.
My Problem, I can't set 3 different justifications in 1 textframe. With the textpoint size and the color it works fine.
If I set a justification, all textranges are left, leftJustified or right..
My example how I tried to do it:
preIndex = nTF.insertionPoints[-1].index;
nTF.insertionPoints[-1].contents = XMLdata[i]['title'];
endIndex = nTF.insertionPoints[-1].index;
// Textbereich wählen und Formatierung zuweisen
myRange = nTF.insertionPoints.itemByRange(preIndex,  endIndex);
myRange.justification = Justification.leftAlign;
myRange.pointSize = 12;
nTF.insertionPoints[-1].contents = "\n";
nTF.insertionPoints[-1].contents = "\n";
preIndex = nTF.insertionPoints[-1].index;
nTF.insertionPoints[-1].contents = XMLdata[i]['description']; // Inhalt hinter die letzte Position des bereits vorhandenen Textframes setzen
endIndex = nTF.insertionPoints[-1].index;
//nTF.selectTextStyleRange.justification = Justification.LEFT_JUSTIFIED;
// Textbereich wählen und Formatierung zuweisen
myRange = nTF.insertionPoints.itemByRange(preIndex,  endIndex);
myRange.justification = Justification.leftJustified;
myRange.pointSize = 8;
nTF.insertionPoints[-1].contents = "\n";
preIndex = nTF.insertionPoints[-1].index;
nTF.insertionPoints[-1].contents = XMLdata[x]['ean-number']; // Inhalt hinter die letzte Position des bereits vorhandenen Textframes setzen
endIndex = nTF.insertionPoints[-1].index;
//nTF.textStyleRanges[-1].justification = Justification.RIGHT_ALIGN;
// Textbereich wählen und Formatierung zuweisen
myRange = nTF.insertionPoints.itemByRange(preIndex,  endIndex);
myRange.justification = Justification.rightAlign;
myRange.pointSize = 8;
best regards
mischa

You can set text size and color because those are Character attributes. Justification is a Paragraph attribute -- it makes sense that tou cannot set both left and right justification in a single paragraph.
I fast-read your code (which is a bit unreadable due to Jive), and at a glance seems you are using "\n" to "separate" paragraphs with. Is that correct? If so, well, don't. It inserts a soft line break instead of a paragraph return (which, you might want to know, is "\r").

Similar Messages

  • How to add/replace/correct narration in a Video Demo project?

    I've recorder a Video Demo project in CP 6 and would like to correct existing narration. In particular, I'd like to add more detailed explanation at some places. Is there any practical workflow that could be used here?

    A video stretching? How would that look? You can split a video in two clips, add a static image like a snapshot if you need to increase the duration of the video.
    I will mostly do a temporary narration during the video capture so that the timing at least is correct. Later on I'll record the real narration and try to keep up to the same length of the temporary one. That is always the trouble with synchronising to a video instead of to the static slides that you get with Automatic capture. On Static slide you can move object to adapt to the narration.
    Lilybiri

  • After the latest update, all my apple products reverted to an old icloud account.  As it no longer exists, I cannot get into it to delete it and add the correct id.  How can I change this, especially on my Macbook pro?

    After the latest update, all my apple products reverted to an old icloud account.  As it no longer exists, I cannot get into it to delete it and add the correct id.  How can I change this, especially on my Macbook pro?  There is no p/w related to it and even though I tried to reset "password" it won't allow as the id does not exist, neither does the email associated with the old id.  How do I switch it to a newer id?

    It's all rather odd because the old account cannot 'no longer exist' - if you don't have the correct password you won't be able to get into it, but you can't actually delete an iCloud account from the server.
    I'm afraid you will need the services of iCloud Support. If you currently happen to have AppleCare, either because you recently bought Apple hardware or have paid to extend the inititial period, you can contact them here:
    http://www.apple.com/support/icloud/contact/
    You will need the serial number of the covered hardware.
    If you are not covered by AppleCare, then - in common with other free email services - there is no free support and you may be asked to pay a fee.

  • How to add a library (libSomeRandomlib.so) to a project....??

    Ok, so I've been trying to get CERN's ROOT program/libraries to work in an xcode project for a while, but I'm running into one really weird error, and I think I may just not know how to add a library to a project correctly.
    Suppose I create a new Xcode C++ command line tool project. I hit Build and go, and it gives me a nice little Hello World! in the console, just as it should. If I then click on the project in Groups & Files, go to Project>Add to Project..., and choose, say, libCint.so, from my root/lib directory, and click ok, then click Build & Go, I get an error in the console:
    dyld: Library not loaded: @rpath/libCint.so
    Referenced from: /Users/paulthompson/Documents/Programming/Build Products/Debug/LibraryIncludeTest
    Reason: image not found
    sharedlibrary apply-load-rules all
    Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.)
    My assumption is that either I'm missing a step in the process of adding a library, or else there is something jacked up with the libraries themselves. Anyone have any advice?
    Thanks,
    Paul
    EDIT* Oh, I should mention that the actuall binary that gets built after adding the library WILL execute properly in the Finder, or from terminal, just not with the Build & Go, or Go commands from within xcode.
    Message was edited by: TraxusIV

    TraxusIV wrote:
    Results of otool:
    LibraryIncludeTest:
    @rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
    Macintosh-9:Debug paulthompson$ otool -L /Applications/CERNRoot/root/lib/libCint.so
    /Applications/CERNRoot/root/lib/libCint.so:
    @rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    I honestly don't know much about @rpath. I found this page that explains it a bit more: http://blogs.sun.com/dipol/entry/dynamiclibraries_rpath_andmac
    So, since I don't want to deploy with the environment variable set, I should ask, what IS the correct, MacOS X way to do it?
    The best way to find that is to look at how Apple does it. They put frameworks in /System/Library/Frameworks and regular shared libraries in the standard places. You can do the same. Put your frameworks into /Library/Frameworks and your shared libraries into /usr/local-based paths.
    If you want to create stand-alone executables that can be installed via drag-n-drop, you can put shared libraries inside the application bundle. If your shared libraries/frameworks are elsewhere, you will need some sort of installer to get them installed.
    I've been sifting through Apple's developer documentation but I have yet to find a concise, straightforward explanation of how to add shared libraries. I'm horribly confused at this point. Is there a good tutorial available anywhere for both the general unix case of linking to dylibs and .so's, and the Mac specific case?
    Hopefully someone else knows an answer for this one.
    *EDIT* I do already have the variable defined both in ~/.MacOS/environment.plist and also in Xcode as an additional user variable.
    I'm not sure about the whole RPATH thing. Setting environment.plist will define environment variables for use in the Finder, but that is really a hack. There are better ways to do it, but if you are porting some open-source programs, that may be the only way. You should be able to define those variables in Xcode. You have to selected the debug executable under "Exectuables"

  • How to add an orange link arrow on a report

    Hi forumers !
    I added an orange link arrow on a simple report (just to know how to add the orange drill down link). My report displays the following fields: CardCode, CardName and Balance taken from OCRD table.
    I want to add a link arrow on CardCode such that if I click on it, I can see the BP card. For this, i added the image of an orange arow, then create a hyperlink on it. The query I used is  'http://$b1$/link?table=OCRD&key='+{OCRD.CardCode}.
    When I run the report and click on the link, IE opens and I get the following error message :"unable to open the page".
    I've tried several ideas found on this forum , but I still getting the same error message.
    My questions are:
    How can I do to correctly see the BP card using the link arrow?
    Is there any security settings in IE I must do in order to display the BP card?
    Thanks !

    Hi Yves
    try to type at the end of your query the following
    select cardcode,cardname,balance from ocrd
    for browse
    and execute it again
    Edited by: Fasolis Vasilios on Nov 30, 2011 12:10 PM

  • How to add a new character set encoding?

    Hello,
    can anybody please explain to me, how to add a new character set encoding to Mac OS Tiger?
    I have two Mac laptops, a new one with Snow Leopard and an older one with Tiger, and on the old one i cannot use or enable anywhere the "Russian (DOS)" character set encoding, which i need to be able to use some old text files.
    On the Snow Leopard, this encoding is present in the list of available encodings of TextWrangler, but not in TIger.
    If i have understood correctly, this is not a problem of TextWrangler, and the same encodings are available systemwide.
    So, the question is: how to add new encodings to Tiger (or to Mac OS in general)?
    Thanks.

    I think possibly that's in the Get Info window of Finder?
    I don't think either that or the input menu have any effect on available encoding choices. Adding languages to system prefs/international/languages can do that, but once you have added Russian there, I don't know of any way to add an additional Russian encoding (there are quite a number of them).

  • Add-CMDeploymentType: How to add a file/folder detection method

    Hello all,
    I'm discovering how to add applications & deploymenttypes to my SCCM deployment through Powershell.
    Adding the application went smoothly, but I'm struggling a bit at the deploymenttype.
    I want to add a file/folder detection clause as you can in the admin console, but it seems that that the Add-CMDeploymentType cmdlet doesn't allow this..
    Am I correct?
    Can you only add a scripted detection clause to the deploymenttype?
    For now I've just added the following Powershell detection clause:
    Test-Path %PATH_TO_A_FILE_OF_THE_APP%
    This will then return true after the application has installed.
    Thanks for your insights on this!
    Filip

    Hello Christopher,
    command I execute:
    I've just tried what you suggested, but now the path to the detection script just gets put into the script content window, instead of the contents of the file..
    http://sdrv.ms/1fx6wnN
    This is the command I execute:
    $NewDT=Add-CMDeploymentType
    -ApplicationName
    $AppName
    -ScriptInstaller
    -DeploymentTypeName
    "Local Install"
    -InstallationProgram
    $DTProgram
    -InstallationBehaviorType
    $DTBehavior
    -LogonRequirementType
    $DTLogonReq
    -ContentLocation
    $DTContentLocation
    -ManualSpecifyDeploymentType
    -DetectDeploymentTypeByCustomScript
    -ScriptType
    Powershell
    -ScriptContent
    \\syn-sccm01\sources\SCCM\Packages\PSTest\GoogleEarthDetection.ps1
    Should I quote that path somewhere?
    Thanks!

  • How to Add a Row by clicking in other different Region

    Hello Im trying to build a page that allows me to add items to a region by clicking in a report region in the same page.
    I created a Report Region with my information , It has a link and one image in the region 1.
    in other region(REgion 2) I have a tabular form from one table,
    the idea is , how to Add rows to the tabular form(REgion 2) clicking items from the reports region (Region 1)the item could be the image or the link.
    I tried with Addrow javaScrip, on my image as a link or even my link, and it worked ,but it works just adding an empty row and i need to add a row with information of the report region (Region 2) for example ID_product.
    so this is other question how to use Addrow javascrip , including data in the row automaticly .
    Well this is what i have been trying ,I don't know if this is the correct way to do it , or if the best way.
    Maybe there is another method , like ajax or something
    Please any advice will be appreciated.

    Hello Im trying to build a page that allows me to add items to a region by clicking in a report region in the same page.
    I created a Report Region with my information , It has a link and one image in the region 1.
    in other region(REgion 2) I have a tabular form from one table,
    the idea is , how to Add rows to the tabular form(REgion 2) clicking items from the reports region (Region 1)the item could be the image or the link.
    I tried with Addrow javaScrip, on my image as a link or even my link, and it worked ,but it works just adding an empty row and i need to add a row with information of the report region (Region 2) for example ID_product.
    so this is other question how to use Addrow javascrip , including data in the row automaticly .
    Well this is what i have been trying ,I don't know if this is the correct way to do it , or if the best way.
    Maybe there is another method , like ajax or something
    Please any advice will be appreciated.

  • How to add a customer field or extn coll in the tab1&2&3..of a UDO doc?

    Hi Experts,
    Does anybody know how to add a customer field or extn collection in the unused  tabs like tab1&2...in a UDO document?
    Thanks for your reply in advance.
    Thanks & Regards,
    David

    Hi Subhasini - <br><br>
    It seems you have discovered that adding an extension field to the Project Suppliers collection is not possible; many of the collections in E-Sourcing do not support extensions and, even when they do, typically, the table view of the data cannot be changed to show the extension value (it would only show on a "details" page, for example.<br><br>
    The solution that you have proposed may work, although I think there is a slight mistake in your logic. I believe you are saying that the script would take data from the newly created extension collection and populate data in the out-of-the-box vendor collection. <br><br>
    In thinking about your solution, I believe the benefit is that any logic and reporting based on the standard collection continues to function correctly (e.g., creating an RFx from the Project will use the out-of-the-box vendor collection).<br><br>
    That being said, I generally am reluctant to do a "replace" of a standard collection with an extension collection as you propose. My recommendation is that you challenge the customer on the importance of this requirement. For example, could the code be maintained on the vendor record? Why is it maintained in Projects? If it is maintained in the vendor record, could you just populate a read only collection the Projects that shows the vendor and code? Could a report be written that can be launched from within the Project to show the values? How does the customer intend to use this field? Could the display name of the vendor object be the right place for it?<br><br>
    I hope these ideas are helpful.<br><br>
    Regards,<br><br>
    Rob<br><br>

  • How to add a new url link in a view of an existing webdynpro component?

    How to add a new url link in a view of an existing webdynpro component?

    hi ,
    refer SAP online hep :
    Implementing Enhancements in a View
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/233f2189f74f08e10000000a114a6b/frameset.htm
    To enhance the layout of the view, you can create new UI elements. This procedure is no different u2013 from a technical viewpoint u2013 from creating UI elements in components themselves. All UI elements created within the enhancement implementation can then be processed as usual.
    Enhancements  means inserting user developments into SAP development objects at predefined positions.
    The Enhancement Framework enables you to add functionality to standard SAP software without actually changing the original repository objects, and to organize these enhancements as effectively as possible.
    refernce :
    have a look at this article
    How to Create Enhancement Implementation in Web Dynpro ABAP
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/700317da-bd79-2c10-368e-8f18bf5d8b81&overridelayout=true
    as pointed correctly by Saurav in earlier thread
    regards,
    amit

  • How to add security credentials to SOAP header for EBS Web Service call..

    All,
    I am trying to invoke a webservice that I successfully exposed as a WSDL Web Service using EBS Integrated SOA Gateway. I am using OBIEE 11g Action Framework which uses WebLogic.
    Here are the steps I completed:
    - I exposed a WSDL web service in EBS R12 via Integrated SOA Gateway
    - I granted the access to this service in EBS R12 to user SYSADMIN
    - I used OBIEE 11g to make a Action to call the Web service (using Action Framework) by searching for the WSDL
    - When I try to execute the action: I get the error:
    Action could not be invoked.
    ServiceExecutionFailure :
    Error invoking web service HR_PHONE_API_Service at endpoint http://ip-10-87-33-3.ec2.internal:8000/webservices/SOAProvider/plsql/hr_phone_api/ Missing <wsse:Security> in SOAP Header
    PROBLEM: I am unsure how to add the credentials for SYSADMIN user and password to add the SOAP username/pwd to the outgoing call. Anyone on this forum know how to set up the SOAP to call with the correct credentials? I have been looking at the documentation but it is not clearly explained.

    Dear Heiko,
    did you solve this problem?
    We are facing the same problem. Every parameter that requries "cmd" does not work. I guess we don´t use this paramter the right way.
    Best, Chris

  • How to add an image to an IMAGE control in Java WebDynpro

    hi
    How to add an image to an IMAGE control in Java WebDynpro.
    Please give me the steps to assign an image to an IMAGE control.
    Advanced Thanks
    brahma

    Thank You Mathan MP,
    i tried these steps, but whenever i selected the source property of image UI control, it opens a context window, but this context window does't contain any thing for selection.
    so how to solve this problem ?
    the link whatever u provided is not opened, please send the correct link.
    http://127.0.0.1:1284/help/index.jsp?topic=/com.sap.devmanual.doc.user/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm
    Thanks in Advance
    brahma

  • How to add an image in a JPanel

    Hi All,
    How to add an image in a JPanel and make it display.
    Thanks,

    I have tried with the below code. If I there is any fault please correct me.
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    public class HomePage extends JFrame implements     ActionListener {
        JButton cmdClick;
        JLabel label;
        JPanel homePanel = new JPanel();
        JPanel headPanel = new JPanel();
        JPanel btPanel = new JPanel();
        private JPanel mainPanel = new JPanel(new CardLayout());
        CardLayout cl;
        CalScenario calcFrame = null;
        public HomePage() {
           setTitle("Test Kit");
           setSize( 1008,399);
           setBackground( Color.gray );
           setResizable(false);
           Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
           Rectangle window = getBounds();
           setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);
           setVisible(true);
            homePanel.setLayout(new BorderLayout());
            headPanel.setPreferredSize(new Dimension(1008,153));
            label = new JLabel("Main menu");
            headPanel.add(label);
            headPanel.setBackground(Color.CYAN);
            ImageIcon icon = new ImageIcon("images/slash.gif");
            JLabel imglabel = new JLabel();
            imglabel.setIcon(icon);
            headPanel.add(label);
            this.getContentPane().add(headPanel);
            btPanel.setBackground(Color.ORANGE);
            cmdClick = new JButton("Click here");
            btPanel.add(cmdClick);
            cmdClick.addActionListener(this);
            homePanel.add("North",headPanel);
            homePanel.add("West",btPanel);
            calcFrame = new CalScenario(mainPanel);
            mainPanel.add(homePanel, "HomePanel");
            mainPanel.add(calcFrame, "CalcFrame");
            cl = (CardLayout) (mainPanel.getLayout());
            add(mainPanel);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        public void actionPerformed(ActionEvent source)  {
          if (source.getSource() == (JButton) cmdClick) {
                cl.show(mainPanel, "CalcFrame");
        public static void main( String args[]) {
             HomePage homeFrame = new HomePage();
             homeFrame.setVisible(true);
    }

  • How to add an infoobject in a DSO ,on which Infoset is built

    Hi,
    How to add an infoobject to a DSO,on which an infoset is build.
    In general common infoobjects can be for reporting purpose right?
    Do I need to add the new infoobject in all the DSOs.My infoset consists of 6 DSOs.
    If my concept is wrong.what is the correct method of extracting infoobjects from DSOs to Infoset.
    Regards
    Lucky

    Hi,
    You need to add these two fields in the DSO only. Make sure that you are mapping these two fields in the transformation. After that, drop the data and reload the DSO. Then make changes to the infoset.
    By Component, what I mean:
    I'll take your example only...
    Say, for Material_Group, this data is not coming to DSo data Source. In this case, even if you will add this object to your DSO, you wont be able to map this in the transformation as R3 filed is not available. Ultimately, you wont be able to load data for this. So, its worthless.
    But, you have a master data called 0Material. and Material_Group is an attribute of this 0Material.In this case, you will add 0Material to the infoset directly, as a component of infoset(from the tab infoobject), and you will select Material group. In this way, we generally aceess the master data attributes.
    Revert for more clarification.
    Thanks...
    Shambhu

  • How to add an event to my calendar?

    How to add an event to my calendar?  I tried several times and the events are not there.

        We appreciate you trying, Deborah1964. We'll get your events added! From your home screen, tap Calendar then tap the plus sign in the upper right corner to enter a new event. After you've made sure to selecy the correct dates, times, calendar (email address), etc then tap Add at the top right corner to save the event. Please keep us posted if you run into any error messages or what happens after you save the event if you continue to have trouble.
    JenniferH_VZW
    Follow us on Twitter www.twitter.com/vzwsupport

Maybe you are looking for