Illegal component position when add JLabel to JtextPane

Hi all,
I want to add a JLabel to a JTextPane, the label shoud be put in the lines of text just like the normal text. I have some questions:
1. How can I put the label in the position we want, when I use the method add(label, textPane.getStyledDocument().getLength()), it generates exception :"illegal component position"
2. How can I set the width and the height of the label so that user cannot know that I used the label. I mean the text on label and the normal text on JTextPane must look the same. Of course I know the length of the caption of the label
Thank you very much

How can I put the label in the position we want, I'm not sure you can add a component using that method. I think there is an insertComponent(...) method to use. Also you may need to make the text pane uneditable first if I remember correctly. Something like:
textPane.setEditable(false);
textPane.insertComponent(...);
textPane.setEditable(true);
How can I put the label in the position we want, label.setFont(textPane.getFont());

Similar Messages

  • Why do I get Illegal Component position when I say FlowLayout.CENTER

    The code runs fine if you replace the line
    Jp7.add(submitButton, FlowLayout.CENTER);
    with
    Jp7.add(submitButton);
    I know FlowLayout's default location is CENTER. But when I explicitly say to center the button, it crashes during runtime but compiles fine.
    Whats the reason for this? Is this a bug?
    I am using 1.4.0_03.
    I getthe following error.
    Exception in thread "main" java.lang.IllegalArgumentException: illegal component
    position
    at java.awt.Container.addImpl(Container.java:568)
    at java.awt.Container.add(Container.java:327)
    at Mon2.main(Mon2.java:114)
    ALSO CAN I DO THE SAME WITHOUT USING SO MANY JPANELS?????????????????? I AM NOT NEW TO PROGRAMMING BUT I AM NEW TO GUI PROGRAMMING.
    Thanks in advance.
    import java.sql.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Mon2 extends JFrame{
    static long i =0;
    static int jobid = 0;
    static String StartTime = "";
    static String LastReport = "";
    static String FinishTime = "";
    static String Description = "";
    static String job_position = "";
    static String desc ="";
    public static String database = "";
    public static String user = "";
    public static String password = "";
    static int counter = 1;
    static boolean valuesEntered = false;
      JButton jButton1 = new JButton();
      JButton jButton2 = new JButton();
      JButton jButton3 = new JButton();
      BorderLayout borderLayout1 = new BorderLayout();
      JLabel jLabel1 = new JLabel();
    JTextPane jTextArea1 = new JTextPane();
    static JTextField userArea = new JTextField();
    static JPasswordField passArea = new JPasswordField();
    static JTextField databaseArea = new JTextField();     
    static JFrame f = new JFrame();
    static JLabel us = new JLabel ("UserName: ");
    static JLabel pa = new JLabel ("Password: ");
    static JLabel da = new JLabel ("Database: ");
      BorderLayout borderLayout2 = new BorderLayout();
      JPanel jPanel1 = new JPanel();
      JLabel jLabel2 = new JLabel();
         public Mon2() {
        try  {
          jbInit();
        catch (Exception e) {
          e.printStackTrace();
         public static void main(String args[]) {
              System.out.println("Starting Mon2...");
        f.setSize(300,200);
        f.setTitle("Login");
        f.setLocation(250,250);
        f.setResizable(false);
        Panel Jp1 = new Panel (new BorderLayout());
        Panel Jp3 = new Panel (new BorderLayout());
        Jp3.add(us, BorderLayout.NORTH);
        Jp3.add(pa, BorderLayout.CENTER);
        Jp3.add(da, BorderLayout.SOUTH);
        userArea.setEditable(true);
        userArea.setSize(20,20);
        passArea.setEditable(true);
        databaseArea.setEditable(true);
        JButton submitButton = new JButton("Submit");
        JPanel Jp2 = new JPanel (new BorderLayout());
        JPanel Jp4 = new JPanel (new FlowLayout());
        userArea.setPreferredSize(new Dimension(200,21));
        Jp4.add(userArea, FlowLayout.LEFT);
        Jp4.add(us, FlowLayout.LEFT);
        JPanel Jp5 = new JPanel (new FlowLayout());
        passArea.setPreferredSize(new Dimension(200,21));
        Jp5.add(passArea,FlowLayout.LEFT);
        Jp5.add(pa, FlowLayout.LEFT);
        JPanel Jp6 = new JPanel (new FlowLayout());
        databaseArea.setPreferredSize(new Dimension(200,21));
        databaseArea.setText("DWPROD");
        Jp6.add(databaseArea,FlowLayout.LEFT);
        Jp6.add(da, FlowLayout.LEFT);
        Jp1.add(Jp4, BorderLayout.NORTH);
        Jp1.add(Jp5, BorderLayout.CENTER);
        Jp2.add(Jp6, BorderLayout.NORTH);
       JPanel Jp7 = new JPanel(new FlowLayout());
    ///////////////////////////This is  the line//////////////////
    //If you remove the ,FlowLayout.CENTER it works fine.
    //If you leave it like as it is, it will compile but then give runtime error
        Jp7.add(submitButton, FlowLayout.CENTER);
        Jp2.add(Jp7, BorderLayout.SOUTH);
        Jp1.add(Jp2, BorderLayout.SOUTH);
        f.getContentPane().add(Jp1);
        Image img = Toolkit.getDefaultToolkit().getImage("c:\\appletHeader.gif");
        f.setIconImage(img);
        f.setDefaultCloseOperation(3);
        f.setVisible(true);
        f.pack();
         submitButton.resize(75, 30);
        submitButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(ActionEvent e) {
        user = userArea.getText();
        password = passArea.getText();
        database = databaseArea.getText();
        if((user.equals(null) || password.equals(null) || database.equals(null) || user.equals("") || password.equals("") || database.equals(""))){
        valuesEntered = false;
        else{
             valuesEntered = true;
        if(valuesEntered == true){
        f.setVisible(false);
              Mon2 mainFrame = new Mon2();
              mainFrame.setSize(600, 400);
              mainFrame.setTitle("Monitor");
        mainFrame.setLocation(100,200);
        mainFrame.setResizable(false);
        desc = "ERROR! or there are no locked jobs.";
              mainFrame.setVisible(true);
        else{
        JOptionPane.showMessageDialog(null,"Must enter values for UserName, Password and Database", "Value Required",JOptionPane.INFORMATION_MESSAGE);
    //    System.exit(0);
      private void jbInit() throws Exception {
        this.setDefaultCloseOperation(3);
        jButton1.setText("Refresh");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
          jButton1_actionPerformed(e);
        jButton2.setText(" Exit ");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            System.exit(0);
        this.getContentPane().setLayout(borderLayout1);
        jButton3.setText("Clear");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            jTextArea1.setText("Click on Refresh to update screen.");
        Panel p = new Panel(new FlowLayout());
        Panel p2 = new Panel (new BorderLayout());
        jLabel1.setText("Monitor for current Job");
        jTextArea1.setPreferredSize(new Dimension(8, 50));
        jTextArea1.setContentType("text/html");
        jTextArea1.setText("");
        jTextArea1.setEditable(false);
        f.setResizable(false);
        f.setTitle("Login");
        jLabel2.setHorizontalTextPosition(SwingConstants.LEFT);
        jLabel2.setText("jLabel2");
        jLabel2.setHorizontalAlignment(SwingConstants.LEFT);
        f.getContentPane().setLayout(borderLayout2);
        jTextArea1.setSize(100,10);
        p.add(jButton1);
        p.add(jButton3);
        p.add(jButton2);
        this.getContentPane().add(jLabel1, BorderLayout.NORTH);
        this.getContentPane().add(jTextArea1, BorderLayout.CENTER);
        p2.add(p, BorderLayout.CENTER);
        this.getContentPane().add(p2, BorderLayout.SOUTH);
        pack();
        f.getContentPane().add(jPanel1, BorderLayout.CENTER);
        jPanel1.add(jLabel2, null);
      void jButton1_actionPerformed(ActionEvent e){
            jTextArea1.setText("Refreshing...");
            long i = 0;
         try{
              jTextArea1.setText("In side try block");
                    Thread.sleep(1000);
                   DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                   jTextArea1.setText("DriverManager");
                  Connection conn=
                   DriverManager.getConnection("jdbc:oracle:thin:@machine:1234:"+ database, user, password);
                                                                          jTextArea1.setText("Got COnnection");
                   Statement stmt = conn.createStatement();
                   jTextArea1.setText("Statement Created");
                   ResultSet rs =
                   stmt.executeQuery("select 1, sysdate, sysdate, sysdate, sysdate, sysdate from dual ");
                   jTextArea1.setText("Query Executed");
                   while(rs.next()){
          jobid = rs.getInt(1);
          StartTime = rs.getString(2);
          LastReport = rs.getString(3);
          FinishTime = rs.getString(4);
          Description = rs.getString(5);
          job_position = rs.getString(6);
          desc = "<b>Count: </b>" + counter + "" +
                     "<p><table border = '1'><tr><td><b>JOB ID:      </b></td><td>" + jobid + "</td></tr>" +
                 "<tr><td><b>Start Time:  </b></td><td>" + StartTime + "</td></tr>" +
                 "<tr><td><b>Last Report: </b></td><td>" + LastReport + "</td></tr>" +
                 "<tr><td><b>FinishTime:  </b></td><td>" + FinishTime + "</td></tr>" +
                 "<tr><td><b>Description: </b></td><td>" + Description + "</td></tr>" +
                 "<tr><td><b>Position:    </b></td><td>" + job_position + "</td></tr></table>";
                  counter = counter + 1;
                     rs.close();
                   conn.close();
                    jTextArea1.setText("Sleeping");
                    jTextArea1.setText(desc);
                    desc = "";
              catch (SQLException se){
              jTextArea1.setText(desc + se);
           catch(Exception ee){
                jTextArea1.setText("Exception occured\n\n" + ee);
    }

    Get your basics checked.
    Go to:
    http://developer.java.sun.com/developer/onlineTraining/GUI/AWTLayoutMgr/shortcourse.html#whatAreLMs
    And find the heading: FlowLayout Variations
    FlowLayout can be customized at construction time by passing the
    constructor an alignment setting:
    FlowLayout.CENTER (the default)
    FlowLayout.RIGHT
    FlowLayout.LEFT

  • Illegal component position error

    Hi I'm new to GUI's and I'm trying to add a menu bar onto my jframe for a creation of a word processor. I'm using the Jtextarea for the text field. I keep getting this message but dont understand what it means:
    java.lang.IllegalArgumentException: illegal component position
    at java.awt.Container.addImpl(Container.java:325)
    at java.awt.Container.add(Container.java:252)
    at javax.swing.JMenu.add(JMenu.java:511)
    at wordprocessor.WordProcessorDemo.<init>(WordProcessorDemo.java:68)
    at wordprocessor.WordProcessorDemo.main(WordProcessorDemo.java:18)Any help would be greatly appreciated. Thanks.

    Is that the only thing wrong or is there more to it?

  • How to get the Useru2019s position when the user doesnu2019t have CP relation

    We have a custom program which will add / delete attributes (In transaction PPOSA_BBP). It is working fine for users which were assigned with CP relation But it fails for users which doesnu2019t have CP relation (since we are getting the position of users form HRP1001 then we are retrieving the existing attributes based on the position after that updating the attributes) as we are getting the position from HRP1001 it fails for users were no CP relation.
    Help us how to get the Useru2019s position when the user doesnu2019t have CP relation. Suggest us any function module or how to query the HRP1001 or some other table if exists
    Regards
    Paul

    Hi Paul,
    Have a look at these tables.
    Using table BUT000 the central business partner data are stored, f.e. partner type, partner names, partner number, partner guid, person number, etc. In table BUTBKK the bank data to a business partner are stored.
    Central business partner address data
    The table ADRC is used for the address of a business partner. Table BUT020 links the business partner number with the address number. Using table BUT021 several addresses to a business partner with different usages (modes), f.e. correspondence or delivery address, can be stored. The personal data of a business partner person are stored with key person number in table ADRP. The person number is assignd to a business partner person in table BUT000. Communication data of business partners as e-mail, telephone, fax, etc. are stored in the tables ADDR1 u2013 ADDR12. The business address of a contact person or an employee consists of the organization address (company resp. org.-unit) and of an address addition, which describes f.e. a building, a room number, etc. The address addition is stored in table ADCP and is identified by the keys address number of the organization address and person number.
    Relationships between business partners
    Table BUT050 contains the relationships between a business partner organization and a business partner person using relation types. The relation types are defined in table TBZ9, f.e. the relation type u2018has employeeu2019 corresponds to identifier u2018BUR010u2019, the relation type u2018has contact personu2019 corresponds to identifier u2018BUR001u2019. Table BUT051 stores communication data of a contact person relationship (compare to table ADCP). Table BUT052 stores several address numbers to one business partner relationship (including a standard flag).
    Hope this helps,
    Kind Regards,
    Matthew

  • Keep layout position when using Find/Change?

    When using Find/Change in InDesign CS4, each occurrence of the "Found" material is centered in the window, so the page moves around with each find. Is there a way to keep the page in a fixed position when searching through a document?

    Actually, I can think of a shortcut for the hard part: The user uses the
    regular find/change UI to make all their settings. Then, they run the
    script, which will simply use the settings in the UI. Nice, huh! So you
    could get a listBox of all the finds -- select the entry and you get
    taken to the desired location. Click the "change" button and the change
    is made. Here's a proof of concept:
    #targetengine engine20
    var myFinds = app.findText();
    var w = new Window("palette");
    var myList = w.add("listbox", undefined, myFinds);
    var changeButton = w.add("button", undefined, "Change");
    myList.onChange = gotoFound;
    changeButton.onClick = makeTheChange;
    w.show();
    function gotoFound(){
    app.select(myFinds[myList.selection.index].parentTextFrames[0].parent.parent);
         app.select(myFinds[myList.selection.index]);
    function makeTheChange(){
         myFinds[myList.selection.index].changeText();
    Obviously very rudimentary: but this does work in CS4. If the list is
    too long, though, the change button will disappear off the bottom of the
    screen. Also, really once the change is made, the item should be removed
    from the list, but there's a bug in CS4 that makes it impossible to do
    that simply, if I recall correctly (or was that only a tree list?)
    Also, I have found that the only sure way of getting the entire spread
    to show is as I've done it above (and it would need much more error
    checking than this -- for instance, overset text).
    Ariel

  • Illegal component usage

    Hello,
    I created an SC, DC etc. on a fresh NWDI. Created the track on that SC, mde references and checked in SAP-JEE, SAP_BUILDT, SAP_JTECHS (7.00 SP7) (SDA I ttok from my Netweaver Server, had none on NWDI). And I created a new WebDynpro Project on that track with NWDS 7.00 SP 6 (may that be the cause of Problem?).
    The Problem is I get on my still empty project after syncing all SC Archives:
    Check for used DCs failed: Illegal component usage: compartment "MY_COMPONENT" does not use compartment "sap.com_SAP_BUILDT_1" of used DC "sap.com/tc/bi/bp/webDynpro"; using DC: myDC(MYComponent)
    Any clue what that shall tell me????
    I think in generell that procedure is much to complicated with going first to SLD for SC and Product, then to CMS to create a track, give references to SCs, you just have to know which you need. Then you have to check these SCs in and so on (I never understood that step at ALL why that is needed...). To much steps to make errors...
    Best regards,
    Frank

    Sorry in the whole dropdown I see nothing of this three SCs. I'm at the right place to add the three SCs, but I just don't FIND them, because naming ist totally different here.
    Documentation in the nice "do something but don't tell me how" style of SAP sais:
    <b>Create a product and software component in System Landscape Directory (SLD). Define the build dependencies required for J2EE development on the following software components:
    +    SAP_BUILDT
    +    SAP_JTECHS
    +    SAP-JEE
    </b>
    Okay found them finally Its
    + SAP J2EE ENGINE <Release> (SAP-JEE <Release>)
    + DI BUILD TOOL <Release> (SAP_BUILDT <Release>)
    + SAP JAVA TECHNOLOGY SERVICES <Release> (SAP_JTECHS <Release>)
    for all other who are searching for them. Found it at:
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/de/e1/2aa0753d12479cb6f21c38371299a7/content.htm">Creating a SC in the SLD</a>
    and guessed that SAP Build Tool is now the DI Build Tool...

  • MediaElement can not set Position when file reaches NaturalDuration

    I have created a mediaplayer in which I added a button to go one frame forward.
    I'm getting the total duration after the media is opened with
    mediaPlayer.NaturalDuration.TimeSpan
    In this case the value is {00:02:27.7720000}
    Every time I click on the button I do
    // Add one frame
    var frameTimeCode = TimeCode.FromFrames(1, SmpteFrameRate.Smpte25);
    var newTime = time;
    if (forward)
    newTime = time.Add(frameTimeCode);
    // If newTime is bigger than TotalDurationTimeCode, setting the position should automatically set it to TotalDurationTimeCode.
    // But still checking newTime. Just to be sure
    if (newTime > TotalDurationTimeCode)
    newTime = TotalDurationTimeCode;
    mediaPlayer.Position = TimeSpan.FromSeconds(newTime.TotalSeconds);
    After this, I get the position with
    currentPosition = mediaPlayer.Position;
    If I let it play, it plays until total duration is reached. Same goes for fast forward.
    But if I go frame by frame, I can't get beyond {00:02:26.7720000}
    It seems like I can't set the position once it reaches {00:02:26.7720000}.
    Also, when I rewind one frame from total duration, it skips to {00:02:26.7720000}.
    I tested with another file and that one also has a one second difference in total duration and position.
    - Edit -
    If I get the position right after I set it, than I do get the right position.
    But if I get the position later it will be set to {00:02:26.7720000}, even if I set the position manually to a value between {00:02:26.7720000} and {00:02:27.7720000}, it will jump back to {00:02:26.7720000}

    That was one of the things I found too.
    But that doesn't explain why it does get the right position (and plays to the end) when playing normally or in fast forward.
    The only difference is that I get the current position in a DispatchTimer when playing normal or in fast forward.
    ticker = new DispatcherTimer();
    ticker.Interval = TimeSpan.FromMilliseconds(interval);
    ticker.Tick += delegate
    PositionUpdateIndicator();
    private void PositionUpdateIndicator()
    currentPosition = mediaPlayer.Position;
    // Other code that updates mediaPlayer.Position
    When I get the current position per frame, the DispatchTimer is stopped and I just call
    PositionUpdateIndicator();
    - Edit -
    Oh wait, I see another difference. When I do the frame forward, I also Pause the player.. Maybe that is messing things up. I'll be continuing my research tomorrow.

  • Div box shifted position when previewed on browsers??

    Hi,
    Can anyone please advise why one of my div boxes (the third one) in Dreamweaver shifted position when previewed on Firefox and IE?  My other two div boxes have no problem when previewed on browsers.
    #textBoxForDesignTitle {
        height: 40px;
        width: 372px;
        font-size: 15px;
        color: #C9B042;
        background-color: #0E103E;
        text-align: center;
        margin-left: 414px;
        border-collapse: collapse;
        border-spacing: 20px 0px;
        font-style: normal;
        font-weight: lighter;
        border-radius: 20px;
        -webkit-box-shadow: 2px 2px 9px 1px #000000;
        box-shadow: 2px 2px 9px 1px #000000;
        border: medium ridge #C9B042;
        padding-top: 1px;
        margin-top: -4px;
    #textBoxTwoForDesignTitle {
        height: 40px;
        width: 372px;
        font-size: 15px;
        color: #C9B042;
        background-color: #0E103E;
        text-align: center;
        border-collapse: collapse;
        border-spacing: 20px 0px;
        font-style: normal;
        font-weight: lighter;
        border-radius: 20px;
        -webkit-box-shadow: 2px 2px 9px 1px #000000;
        box-shadow: 2px 2px 9px 1px #000000;
        border: medium ridge #C9B042;
        padding-top: 1px;
        float: left;
        position: relative;
        left: 35px;
    #textBoxThreeForDesignTitle {
        height: 40px;
        width: 372px;
        font-size: 15px;
        color: #C9B042;
        background-color: #0E103E;
        text-align: center;
        border-collapse: collapse;
        border-spacing: 20px 0px;
        font-style: normal;
        font-weight: lighter;
        border-radius: 20px;
        -webkit-box-shadow: 2px 2px 9px 1px #000000;
        box-shadow: 2px 2px 9px 1px #000000;
        border: medium ridge #C9B042;
        padding-top: 1px;
        position: relative;
        left: 166px;
        float: left;
    Thanks very much!!
    mykw123

    Hi Preran,
    Sure, I can share with other users but I am not sure this solution was the best, but it works for me.   Somehow something about Dreamweaver is very complicated to use and understand- just in my opinion.  All I did was to add another div box outside of the 3rd text box which I created as div box (also did it for the 2nd text box since they aligned close to each other).  I know it shouldn't be needed since the text box is already a div box itself and my 1st and 2nd text boxes were okay.
    Preran- please see my other question posted and maybe you can help?  Thank you.
    http://forums.adobe.com/message/6172302#6172302
    Thanks,
    mykw123

  • How to listen and obtain caret positions of changed text in JTextPane?

    Hi,
    I have a JTextPane that displays text with some styles on particular words in the text. For example, I highlight words with red color if they are in my dictionary file. I use regular expression to find matches, replace them with their corresponded definitions, and call setCharacterAttributes to add styles to the definitions. I store all start and end caret positions of the matched words/definitions in a vector. So, I can redisplay styles of all previous matches.
    The problem is that I'd like to be able to edit the text of some previous matches. So, with those changes all caret positions that I already store in the vector need to be updated.
    How can I obtain caret positions of changed text in JTextPane?
    How can I know that a user is currently changing text in the JTextPane?
    How can I get style of text such as color that is being changed?
    Thank you very much.

    Thank you very much, camickr, for your reply.
    I think that I might not know the right way to handle JTextPane and Document object.
    What I have done are:
    - Add style to JTextPane using, for example,
    Style targetCurrentMatchStyle = this.targetWindowTextPane.addStyle("Red", null);
    StyleConstants.setForeground(targetCurrentMatchStyle, Color.red);//For highlight - Then, I use regular expression (Pattern and Matcher) to find a match in text. For each match, I get start and end position from matcher.start() and matcher.end().
    if(matcher.find(start)){
    String term=matcher.group();
    int start=matcher.start();
    int end = matcher.end();
    //find definition for the matched term.
    String definition=mydictionaryHash.get(term);
    //Store caret positions in lists
    startPositionList.add(start);
    matchedLength=lengthList.add(definition.length());
    //Add changed to text in textpane
    StringBuffer sb=new StringBuffer();
    matcher.appendReplacement(sb, definition);
    matcher.appendTail(sb);
    //Get translated text from StringBuffer after replacement
    String translatedText=sb.toString();
    targetWindoTextPane.setText(translatedText);
    //Update start position for next search
    start=start+definition.length();
    //Add style to matched regions below.
    }- From the lists of start positions and matched lengths, I use the following code to add "Red" color to the matched text regions including all previously matched.
    for(int i=0;i<startPositionList.size();i++){
    this.targetWindowTextPane.getStyledDocument().setCharacterAttributes(
    startPositionList.get(i),
    lengthList.get(i),
    this.targetWindowTextPane.getStyle("Red"),
    true);
    }My issue is that I'd like to be able edit previously matched regions and update all positions of the matched regions stored in the lists.

  • Although all photos in my libraries are rotated to the correct orientation, random pictures still show up in the wrong position when viewed on Apple TV. Any suggestions?

    Although all photos in my libraries are rotated to the correct orientation, random pictures still show up in the wrong position when viewed on Apple TV.
    Any suggestions?

    silvergc
    Thanks for your comments
    Several of our iPhone users in the UK reported the problem this morning, and as the Apple fan in the office I've got the job of resolving the issue
    The original Excel was an old .xls file, but I have saved it as a .xlsx and the problem still appears
    I haven't spoken with our developer yet, but I assume he has created the Excel file using some programming tools rather that directly using Excel
    In the meantime I have created a simply spreadsheet with 8 cells contain values
    In the first 4 cells, I have formatted them using Currency, and have used the currencies USD, DEM, GBP and CHF
    In the remaining cells I have formatted them using the Accounting option, using the same currencies
    When I review the spreadsheet on the iPhone (or iPad), the first 4 remain the same yet the last four all show the £ symbol
    I have now changed the Region Format of the iPhone to United States, and when viewing on the iPhone the bottom 4 values are now all showing the $ sign!
    If I had created the spreadsheet I would have put the Currency code in a seperate cell and purely used a numeric format for the number, and there would be no issue.  That might be the only solution
    Yes, the Director has the full MS Excel app on his Windows 8 device, but I can't expect all of our clients to go and do the same, in business many of them will have the iPhone
    We may have to change the way we produce the report because of Apple's failings here, and it's not the first time that we have had to change something because Apple devices can't display them properly
    In business, submitting a potential job contract only for the recipient to get the wrong idea of the costs is a major concern

  • Problem when Add Serial Number for Goods Receipt PO Document

    Dear All,
    In my App I have function to Add goods receipt PO and Serial for these items of this document as code bellows:
    oGrp = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
                'Add Header Goods Receipt
                oGrp.CardCode = "CC1"
                oGrp.CardName = "Card Code 1."
                oGrp.DocDate = now
                oGrp.DocDueDate = now
                oGrp.TaxDate = now
                Dim Qty As Int32 = 2
                For i As Integer = 0 To Qty - 1
                    oGrp.Lines.SerialNumbers.SystemSerialNumber = 1
                    oGrp.Lines.SerialNumbers.ManufacturerSerialNumber = "MSR01" & "-" & i
                    oGrp.Lines.SerialNumbers.InternalSerialNumber = "ISR01" & "-" & i
                    oGrp.Lines.SerialNumbers.SetCurrentLine(i)
                    oGrp.Lines.SerialNumbers.Add()
                Next
                oGrp.Lines.ItemCode = "YMY2H-BLACK"
                oGrp.Lines.ItemDescription = "My Item"
                oGrp.Lines.Currency = "USD"
                oGrp.Lines.Quantity = Qty
                oGrp.Lines.Price = 10000
                oGrp.Lines.DiscountPercent = 0
                RetVal = oGrp.Add()
                If RetVal <> 0 Then
                    oCompany.GetLastError(ErrCode, ErrMsg)
                    Return -1
                Else
                  End If
    When Add this document I have Error : "You should use existing serial/batch numbers for this document type ". Please help me fix this problem. In my SAP doesn't have Serial for these item. Please let me know How to add serial master data?
    Thanks & Regards

    Dear,
    Thanks for your support but when I chaged code as bellows:
    oGrp = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
                'Add Header Goods Receipt
                oGrp.CardCode = "CC1"
                oGrp.CardName = "Card Name."
                oGrp.DocDate = MyArrContainDocInfo(2)
                oGrp.DocDueDate = MyArrContainDocInfo(3)
                oGrp.TaxDate = MyArrContainDocInfo(4)
                Dim Qty As Int32 = 2
                oGrp.Lines.ItemCode = "YMY2H-BLACK"
                oGrp.Lines.ItemDescription = "My Item"
                oGrp.Lines.Currency = "USD"
                oGrp.Lines.Quantity = Qty
                oGrp.Lines.Price = 10000
                oGrp.Lines.DiscountPercent = 0
                For i As Integer = 0 To Qty - 1
                    oGrp.Lines.SerialNumbers.SetCurrentLine(i)
                    oGrp.Lines.SerialNumbers.SystemSerialNumber = i
                    oGrp.Lines.SerialNumbers.ManufacturerSerialNumber = "MSR01" & "-" & i
                    oGrp.Lines.SerialNumbers.InternalSerialNumber = "ISR01" & "-" & i
                    oGrp.Lines.SerialNumbers.Add()
                Next
                RetVal = oGrp.Add()
                If RetVal <> 0 Then
                    oCompany.GetLastError(ErrCode, ErrMsg)
                    Return -1
                Else
                              End If
    I have the same Error: "You should use existing serial/batch numbers for this document type". I try config in Gerneral Setting Form as image bellow: [http://www.hoanghaicap.com/GS.png|http://www.hoanghaicap.com/GS.png]. Please help me fix this problem. I try Add Goods receipt PO with items manage by Serial it's OK but by SDK it's not OK.
    Thanks & Regards,
    Edited by: Tao lao on Mar 10, 2010 2:44 AM

  • When add a people picker (user column) in Word document (Template) and try to add a name it stuck!

    When add a people picker (user column) in Word document (un the document Template) and try to add a name it stuck!
    Is it a known issue?
    keren tsur

    Hi,
    According to your description, I have tested in my environment and I  have the same behavior.
    Only if you type the wrong name in the first time, then you click the phone book to search the right name and save, it will stuck. It means if you do other operation(e.g. type the wrong name then click “resolve” button, then search in the phone book) and
    repeat the operation above, it won’t stuck.
    It is appreciate that you can submit a feedback to Microsoft:
    https://connect.microsoft.com/
    Thanks,
    Dean Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Error: Illegal use of when -style tag without choose as its direct paren

    Hi,
    I'm using the Code:
    <c:choose>
    <c:when test="${empty param.usernaseme}" >
    <B>Hello <c:out value="${param.usernaseme}" /></B>
    </c:when>
    <c:otherwise>
    unknown user name.
    </c:otherwise>
    </c:choose>
    and keep geting the Error:
    Illegal use of <when>-style tag without <choose> as its direct parent
    As far as know
    the code is OK.
    Declare Is OK (Other thigs using <c:out /> working)
    thanks for your halp
    Shimon

    Hi,
    I'm using the Code:
    <c:choose>
    <c:when test="${empty param.usernaseme}" >
    <B>Hello <c:out value="${param.usernaseme}" /></B>
    </c:when>
    <c:otherwise>
    unknown user name.
    </c:otherwise>
    </c:choose>
    and keep geting the Error:
    Illegal use of <when>-style tag without <choose> as its direct parent
    As far as know
    the code is OK.
    Declare Is OK (Other thigs using <c:out /> working)
    thanks for your halp
    Shimon

  • My 27 inch iMac screen will not hold position when I move it.  It just drops back to the lowest position.

    My 27 inch iMac monitor tilts forward and will not hold position when I adjust it up.. Is there a tension adjustment for the monitor position?

    That is a hardware issue that will be covered under warranty if the machine is a 2012 or later iMac. Bring it into your closest Apple Store or AASP for repair.

  • Writing Scripts in FM 10 - What component should I add to my project?

    Hello!
    I have read the section about how to display the appropriate libraries to write scripts for FrameMaker 10 in VBS. However, I still don't know what component I should include in the References of my project.
    Here is some text extracted from help file:
    Displaying the VBScript type libraries
    To view the VBS object library, follow these steps:
    1. Start any Microsoft Office application, and then choose Tools > Macro > Visual Basic Editor.
    2. In the Visual Basic editor window, choose Tools > References.
    3. In the References dialog’s Available References list, select your Creative Suite application, and then
    click OK.
    4. In the Visual Basic editor window, choose View > Object Browser.
    5. Select your Adobe application in the drop-down list in the upper left corner of the Object Browser
    window. [...]
    I have tried following the method stated above, but nothing resembling FrameMaker was available...  Does anyone have an idea of which component I should add to my project?
    Thank  you very much

    Hello Michaël!
    So if I understand your answer correctly, the only way to write scripts for FM 10 would be to use the ExtendScript Toolkit provided with the Technical Communication Suite?
    The help file that is provided with this application led me to believe that it was also possible to use VBS to create scripts for FrameMaker...  I assumed that, since these aspects were covered in the help file that came with the TCS, they surely applied to FM 10 as well...
    Thank you

Maybe you are looking for

  • No Conversation History neither in Outlook Conversation History nor in Lync Conversation Tab

    Good day, people! I use Lync Server 2013 and MSOffice Lync 2013 and also Exchange 2010. All users in our company felt fine about their conversation history in lync. A couple weeks ago it started: i created new AD Users - and their conversation histor

  • Calendar on Ipad won't sync to MacBook Pro

    The Calendar on my MacBook Pro will sync to my Ipad, but additions to the calendar on my Ipad will not sync to my MacBook Pro. I have followed all the directions  on the Apple Support page:  IOS: How to transfer or sync content to your computer. All

  • My firewire ports seemed to stop working - SOS HELP!!!!

    Hey Out there...I have a Mac G4, running OS X 10.3.9. I was importing DV video to iMovie through firewire with no problems, then the next day my computer doesn't recognize my camera is attached. I bought a Lacie D2 DVD +- RW Double Layer burner, that

  • Adobe X Pro document signable by multiple people

    Adobe X Pro document signable by multiple people I have adobe X pro and I want to let anyoen sign the document that I send it too

  • Photoshop CS6 not printing

    Photoshop gives me this message when I try to print from my iMac: There was an error opening your printer. Printing functions will not be available until you have selected a printer and reopened any documents. I've deleted and reinstalled my printer.