Setting/Getting an Insertion Point in a Table Cell

I'm iterating through the cells in a table doing a series of  ITableCommands::SetCellText() calls. This correctly writes to the cells, but I also need to set the insertion point to the first character of the cell somehow. I've got the GridAddress -- is there any way to get the selection from that? (I was able to select the entire cell, but I want to get the text selection from it. Does anybody know how? Thanks.
Bob

I have got the TextIndex of the cell using ITextStoryThread::GetTextStart.

Similar Messages

  • How do I set a BG Image for a specific Table Cell?

    Hello...
    How do I set a Background Image for a specific table cell
    without it affecting the main page background image?
    thanks
    J

    Use CSS -
    td.special { background-image:url(foo.gif); }
    will style this table cell only -
    <td class="special">
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "JSloanSDRE" <[email protected]> wrote in
    message
    news:g2dl7n$pf5$[email protected]..
    > Hello...
    >
    > How do I set a Background Image for a specific table
    cell without it
    > affecting the main page background image?
    >
    > thanks
    > J

  • [CS2-JS] Error when inserting some text in table cell via XMLElement

    I have a very very strange InDesign behaviour when using XMLElement in a table Cell to insert a string.
    For example (in a table that has an XML structure) :
    var cell = table.cells[0];
    var cell_xe = cell.associatedXMLElement;
    var newtag_xe = cell_xe.xmlElements.add("mytag", null);
    // Up to now, no problem
    // Then I use only one of these following instructions at a time :
    newtag_xe.contents = "existe en 4,57 x 1,07 m"; // Gives an InDesign error "Object is invalid"
    newtag_xe.contents = "existe en 4,57 x 1,07 "; // Works fine
    I have a lot of other examples of that kind (not only failing on the last character). InDesign accepts (randomly, it seems) some strings and rejects some others, and no logical rule seems to emerge.
    Anyone with the same problem ?

    Hi Cyril,
    re: "This is where I think InDesign is really not fair : myTextFrame.tables.length == 0 if the table cannot be seen because of vertical overflow !!!"
    I disagree. If the table does not appear in the text frame, then it shouldn't be in the text frame object. If the table appeared as a child of the text frame when it does nto appear in the frame (when it might have moved to another text frame in the story), it would be even more confusing.
    This points out the danger of relying on the text frame as the container--instead, use the parent story of the text frame, which will contain all of the text in the story, regardless of whether it's visible or not.
    Thanks,
    Ole

  • List's bullet points displyaing beyond table cell

    Just need a little workaround / fix for a styled list -
    basically in Firefox, the bullet points are displaying to the left,
    beyond the table cell they're in :
    link
    Any ideas to fix this?
    Cheers.

    Set the margin and the padding for the ul to zero.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Iain71" <[email protected]> wrote in
    message
    news:evts8i$bf0$[email protected]..
    > Just need a little workaround / fix for a styled list -
    basically in
    > Firefox,
    > the bullet points are displaying to the left, beyond the
    table cell
    > they're in :
    >
    >
    http://www.choice-apex.com/
    >
    > Any ideas to fix this?
    >
    > Cheers.
    >

  • How to get the insert scripts from a table data

    hi all,
    i want insert scripts for 100 records from a table.
    suppose i have a table xyz
    xyz:
    id name
    1 abc
    2 def
    i should get insert script for 100 rows like
    insert into xyz(id,name) values (1,'abc');
    insert into xyz(id,name) values (2,'def');
    i want 100 records data from all the tables from my database.
    thanks in advance to all.

    SQL> create table xyz (id number, name varchar2(10));
    Table created.
    SQL> insert into xyz values(1,'abc');
    1 row created.
    SQL> insert into xyz values(2,'def');
    1 row created.
    SQL> select 'insert into xyz values(id,name) values('||id||','''||name||''');' from xyz;
    'INSERTINTOXYZVALUES(ID,NAM
    insert into xyz values(id,name) values(1,'abc');
    insert into xyz values(id,name) values(2,'def');
    SQL>- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Insert LOGO in ALV Table Cell

    Hi Gurus,
    How to insert logo in ALV Cell Level.
    thanks in advance.
    regards,
    kiran.ch

    Hi,
    I saw a sample code in Wiki:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/inserting%2520a%2520logo%2520in%2520alv%2520program
    Edited by: Renjith Michael on Jun 26, 2009 1:12 PM
    Edited by: Renjith Michael on Jun 26, 2009 1:12 PM

  • What's the gesture to get a text insertion point in iOS 7 Keynote?

    I was editing a new presentation. I find I have to tap repeatedly to edit an existing text area so I can get a simple insertion point and not a word selection or selecting the entire area or starting a re-positioning of the area. I have yet to figure out what Apple wants me to do so I can accomplish this.
    I can often get an insertion point after scrabbling away with taps, multiple taps, holds, short drags, and multiple-touch variants, but by the time I do, the sequence is too involved to remember, and who knows how many steps back I'd have to go to identify the start of the gesture?
    And, see another question I just posted: In the course of clawing away at the slide, the entire deck scaled down to half size. So not only does this bug make it hard to get any work done, it seems to be destructive. (WAIT. Found it. My scrabbling turned out to include an ordinary pinch-to-zoom gesture. Never mind. I'll amend my other question.)
    I give up. I've used up all my guesses and I want to know the answer to the riddle. How do I get a between-characters insertion point in an object containing text, but not currently open?

    There is an online help system for all ios iWork apps. This is the link to the keynote one
    http://help.apple.com/keynote/ipad/2.0/#/tancda09fdf9
    I think to place the insertion point you tap and hold until the magnifying loop shows up, then you let go when the cursor is where you want it.
    Jason

  • How to locate the first insertion point on every page?

    I need to paste some same anchored objects on every page for exporting RTF format.
    So I need to locate the first insertion point on every page.
    Then, I use the code below (make a simple example):
    for(i = 0; i < app.documents[0].pages.length; i ++){
         app.select(app.documents[0].pages[i].textFrames[0].insertionPoints[0])
         app.paste()
    But when a file has a very long table spread over several pages, the location operation will select the insertion point before the table --- the starting point of the table.
    For instance, a table start on page 3 and end on page 10
    app.documents[0].pages[4~10].textFrames[0].insertionPoints[0])  can't select the first insertion point from page 4 to page 10. (In terms of scripting, the insertion point exists before the very long table starting on page 3.)
    How can I solve the problem? Thanks in advance.

    I dont know exactly what you are trying to do but you can try this. If you have table which runs trough multiple pages, you can first divede this tabel, that cells on separate pages would represent stand alone table. Than you can fit textframe to this table. When addressing indention poin you will get right position.
    In your case when table start at 3rd and ends on 10th page you would get 8 tables in 8 textframes on its own page. If textframes are linked and table is smaller than textframe you will have problem when addressing first insertion point on 4th or any other page. That why you should fit textframe to table:
    var bl=app.activeDocument.pages[1].textFrames[0].insertionPoints[0].baseline
    var tf=app.activeDocument.pages[1].textFrames[0];
    var gb=[tf.geometricBounds[0],tf.geometricBounds[1],bl,tf.geometricBounds[3]];
    tf.geometricBounds=gb;
    Now when you set
    app.activeDocument.pages[1].textFrames[0].insertionPoints[0] you will get position before table or
    app.activeDocument.pages[1].textFrames[0].insertionPoints[-1] you will get position after table

  • How to get the data from a table cell

    Could somebody suggest me how I can get the data value from a table cell if I set that cell a Double object previously.
    Thanks very much

    Thanks for camickr's information.
    And thanks uhrand,
    I haven't got it sloved. I am sick on this problem.
    I have the methods to let the table editable. My tableModel code is from Sun Tutorial.
    It has the code like this:
    public int getColumnCount() {
                return columnNames.length;
             public int getRowCount() {
                return data.length;
              public String getColumnName(int col) {
                return columnNames[col];
             public Object getValueAt(int row, int col) {
                return data[row][col];
             * JTable uses this method to determine the default renderer/
             * editor for each cell.  If we didn't implement this method,
             * then the last column would contain text ("true"/"false"),
             * rather than a check box.
            public Class getColumnClass(int c) {
                return getValueAt(0, c).getClass();
             * Don't need to implement this method unless your table's
             * editable.
            public boolean isCellEditable(int row, int col) {
                //Note that the data/cell address is constant,
                //no matter where the cell appears onscreen.
                if (col < 1) {
                    return false;
                } else {
                    return true;
             * Don't need to implement this method unless your table's
             * data can change.
            public void setValueAt(Object value, int row, int col) {
                if (DEBUG) {
                    System.out.println("Setting value at " + row + "," + col
                                       + " to " + value
                                       + " (an instance of "
                                       + value.getClass() + ")");
                data[row][col] = value;
                fireTableCellUpdated(row, col);
                if (DEBUG) {
                    System.out.println("New value of data:");
                    printDebugData();
            public void printDebugData() {
                int numRows = getRowCount();
                int numCols = getColumnCount();
                for (int i=0; i < numRows; i++) {
                    System.out.print("    row " + i + ":");
                    for (int j=0; j < numCols; j++) {
                        System.out.print("  " + data[i][j]);
                    System.out.println();
                System.out.println("--------------------------");
            }

  • How do I change "At Insertion Point" to "Below Current Line" globally?

    Hello,
    I have a book that I will be converting to Structured FrameMaker. All of the graphics are referenced to the chapters with the Anchored Frame set to:
    "At Insertion Point"
    "Distance Above Baseline: 0.0 pt"
    If I do not change the Anchor Frame to "Below Current Line", then all of my graphics will float above the text, when in Structured FrameMaker and I will have to manually set each graphic to "Below Current Line".
    Since I have already set all the graphics to "At Insertion Point", I was wondering if there was a way I could change this to "Below Current Line" - either through Find/Change or through some plugin.
    I appreciate any/all suggestions related to this topic.
    Thanks,
    Jim

    Hi Jim,
    You could save the documents as MIF and search/replace the correct MIF codes (the MIF files are plain text files). Otherwise, you could use FrameScript or the FDK to do it. If you are interested in a FrameScript solution, please contact me offlist. Thank you very much.
    Rick Quatro
    585-659-8267
    rick at frameexpert dot com

  • Linking FM 9 "At Insertion Point" graphics to an RH 8 project

    Using Technical Communication Suite 2, I have built a structured FM 9 book in order to generate a RH 8 help system. This is a software user guide and I cannot avoid using inline graphics in some body elements. The book only has regular .fm documents (one document per topic), each document has English and French conditions, and I have used the Link command to link the book to a Robohelp project. If I save my FM book as a PDF, everything is perfect, which indicates there are no issues with either the EDD or the EDD_TPL files. In Robohelp, I use an .isf file for modifying RHMapping.css; everything but the following works fine.
    The problem is that upon first linking the book when I create the RH project, RH insists on reading all the inline graphics (set as "At Insertion Point" in FM) as right-aligned paragraphs. There is nothing in my _TPL template that calls for right-aligning anything. Strange thing is that, if I then delete an image in FM and re-insert it, save the file, update the book and then update the RH project, the image is positioned properly in the body element. This would indicate to me that RH 8 is capable of handling inline graphics (like it always has). Needless to say however, that doing this for around 500 inline graphics would be an onerous solution.
    But there is something else.  Deleting and re-inserting the graphic in FM also changes the enclosing element's language condition to "As Is", which is an even greater problem, because I then end up with improper condition-based generation of topics. If I then set the element's condition to what I want it to be, the graphic is right-aligned again in RH.
    I've been raking my brains for a while now and tried all kinds of kludges, in and out of my EDD - to no avail. If anyone else is currently struggling with, or has found a solution to, this problem, I would greatly appreciate hearing from you.
    Thanks

    Hi Mark,
    I looked at the HTML and I see the problem, but didn't see anything specifically controlling this in the CSS. (I don't have much experience with CSS.)
    BTW: I have used your website and Peter Grainge's for help with Help. Thank you!!!
    The issue is:
    There is a line of text in a Frame file (Lettered ptag). In the line of text, there is an anchored frame set to "At Insertion Point." Looks like this:
    3. Click <image in anchored frame> (Add Attachment).
    When the file is linked to RH, it is creates two <p> sections for the text and between those a separate <div> section aligned to the right for the image. This is the HTML:
    <li type="a"><p class="Lettered"><?rh-cbt_start condition="Online, Print, Smart" ?>Click <?rh-cbt_end ?></p>
    <?rh-cbt_start condition="Online, Print, Smart" ?><div align="right">
      <img alt="add_attachments.png" id="image9" src="add_attachments.png"
        style="margin-bottom: -3.000pt; margin-left: 1.500pt; margin-right: 0.882pt;"
        width="18" height="21" border="0" />
    </div><?rh-cbt_end ?>
    <p class="Lettered"><?rh-cbt_start condition="Online, Print, Smart" ?>&#160;<?rh-cbt_end ?><?rh-cbt_start condition="Online, Print, Smart" ?>(Add Attachment).<?rh-cbt_end ?></p></li>
    Appreciate any ideas or CSS suggestions to sort this out.
    Thanks!

  • Add action listener to table cell

    The topic of my previous thread was:
    How can I get characters, which user inputs into table cell?
    I've added lisateners to table:
    table.addKeyListener(new java.awt.event.KeyAdapter() {
                public void keyPressed(java.awt.event.KeyEvent evt){
                    System.out.println("keyPressed");
                public void keyReleased(java.awt.event.KeyEvent evt){
                    System.out.println("keyReleased");
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    System.out.println("keyTyped");
            });But it's not exactly what I need.
    I need to do the same, but with table cell.
    I want to see user input char by char and set color font for user input string.
    How can I add action listener to tble cell?

    This is my newly created JTextField which I will use as CellEditor for My JTable
    JTextField textField = new JTextField(); //creating Component
            textField.addKeyListener(new java.awt.event.KeyAdapter(){ //adding KeyListener
                public void keyReleased(java.awt.event.KeyEvent evt){
                    System.out.println("keyReleased" + ((JTextField)evt.getSource()).getText() + "column = " +table.getSelectedColumn());//test functionality
                    if ( isColumnHasSameValue(table.getSelectedRow(),table.getSelectedColumn(), ((JTextField)evt.getSource()).getText() ) ){//test column for equal values
                        ((JTextField)evt.getSource()).setForeground(Color.RED); //if there is equal value set Color.RED for JTextField text
                    else{ //else set Color.BLACK
                        ((JTextField)evt.getSource()).setForeground(Color.BLACK);
            table.getColumnModel().getColumn(1).setCellEditor(new DefaultCellEditor(textField)); //set custom CellEditor
    private boolean isColumnHasSameValue(int row, int column, String testVal){
            testVal = testVal.trim().toLowerCase(); //put away UpperCase and empty spaces
            for(int i=0;i<model.getRowCount();i++){
               if(i == row){
                   continue;//skip selected row where user inputs text
               if(model.getValueAt(i,column).toString().trim().toLowerCase().startsWith(testVal)){
                    return true; //if test passed
            return false; //if there are no mathes
        }I have a question:
    It seems to me, I did not use optimal solution for JTable values testing.
    What can ty else?
    Maybe, It is better to use
    tableModel.getDataVector();And then use Pattern and Matcher ?
    Am I right?

  • How to display system date on table cells

    hi all,
    I would like to display the PC date onto a specified cell on a table. I have attached here my vis. I don't know how to get the date displayed at the table cell On the front panel when I run it. Please help.
    Attachments:
    data.vi ‏32 KB
    getPCdate.vi ‏9 KB

    Hi,
    The table control is simply a 2D array of string. So all you need to do is to pick up the Date from the appropriate .vi and replace the array element (using replace array subset) and write the whole table back again. (Example attached for LV 6.0.x)
    // it takes almost no time to rate an answer
    Attachments:
    Untitled_1.vi ‏13 KB

  • Inserting existing records to table and getting new identity ID for each row

    I have an issue that I inherited where I need to insert some data to  12 tables related by FK  for about 40 records to an existing database through TSQL, SSIS is not an option..
    Essentially the situation is that many weeks ago someone deleted a bunch of data and I cant do a restore of the database as new data has been entered so I need to "reconstruct" the data and reinsert it back. I cant just reinsert the data with the
    same Primary keys as they are autogenerated. I restored a backup of the database taken prior to the deletion and have got all of my data I need loaded to temp tables. Now the issue I am running across is how to insert my "Main" table data row by
    row and get the new identity and then update the corresponding row to the source temp table so that it can be used for the next 11 tables that need that Foreign Key.

    How do I loop through the 40 records I am attempting to insert into the "Parent" table though?
    You don't. That is, you don't loop.
    You do:
    MERGE target t
    USING source s ON 1 = 0
    WHEN NOT MATCH BY TARGET THEN
       INSERT (col1, col2, ...)
          VALUES(col1, col2, ...)
    OUTPUT (t.JobId, s.JobId) INTO @idmap(newid, oldid)
    UPDATE source
    SET    newjobdid = i.newid
    FROM   source s
    JOIN   @idmap i ON s.jobid = i.jobid
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Applescript to get the current insertion point of the cursor

    How do I use Applescript to get the current insertion point of the cursor in a Apple pages.app document?

    Oops, missed that one - you are correct, the line should be:
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">set {TheStart, TheEnd} to character range of the selection</pre>
    I have a wrapper script that I use to insert stuff from my handler/code library into a Script Editor document, and was adapting snippets from that for my examples - I guess that one got away.
    As for the dictionary, some applications just have poorly written or outdated documentation. Some of the items have multiple entries (eg, there may be a selection object for the application and also for the document), and some inherit properties from other items. Some are used as nouns, others as verbs (or both). Sometimes it is easier to visualize the item by keeping track of it's reference - the 'some property of document 1 of the current application' thing. You can use the Script Editor's Event Log to see the results of various properties and commands - for example, the above script will result in the following entry (your numbers will vary depending on the selected text):
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">tell current application
    get character range of selection
    {50, 50}
    end tell
    </pre>
    You can also use the 'log' statement (eg, 'log MyVariable') to add your own entries into the log instead of using dialog boxes.

Maybe you are looking for

  • Restricted values are seen in the query

    I have restricted few values in the query. when i execute the query those restricted values are displayed on the top. can any one tell me how to remove it.

  • SWF security settings seem to have no effect

    Here is the location to which I publish my Captivate 5 output. And here is how my flash security settings are configured. I've included the publishing location in the trusted locations collection. After publishing (html output option and swf option c

  • Hardware could not be found

    I've had iDVD 2.1 since I first got this computer (2002) but rarely used it. This morning I went to open it and it said "The application iDVD could not be opened because the required hardware could not be found." How could this be when we are talking

  • SWFElements & ImageElements not unloading on set element

    I originally was using a serial element to handle the loading and unloading however due to being unable to seek on a serial element with the current code release or latest from svn (http://forums.adobe.com/thread/552041?tstart=0) I opted to set Media

  • Unable to install the podcast 1.00.3 on my N95-3 f...

    unable to install the podcast 1.00.3 on my N95-3 firmware V20 Displaying: "unable to install component is built-in" Message Edited by leontancfa on 17-Jun-2008 09:22 PM Message Edited by leontancfa on 17-Jun-2008 09:23 PM