I want to write text in graphics sprite

i want to write text in this sprite
i use thes method but not work when i add textfield to sprite the rect become very small
function drawRect():Sprite
            var redRect:Sprite = new Sprite();
            redRect.graphics.beginFill(0xff0000);    // red
            redRect.graphics.drawRect(0,0,30, 30);
            redRect.graphics.endFill();
            var number:TextField =new TextField();
            number.text = "1";
            number.x= 15;
            number.y= 15;
            redRect.addChild(number);
            return redRect;

Hi:
What you wanted is to make a Red Sprite contains a TextField in the inline graphic element, right?
I think you needed to handle the source Sprite's width and height by yourself. The width and height parameter in the EditManager's insertInlineGraphic function is to set the width and height of the Inline Graphic Element which is the container of your source sprite. The following codes work  fine on my envirnoment. Hope they are helpful:
package
import flash.display.Sprite;
import flash.text.TextField;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.edit.EditManager;
import flashx.textLayout.conversion.TextConverter;
import flashx.textLayout.edit.EditManager;
import flashx.textLayout.elements.TextFlow;
import flashx.undo.UndoManager;
public class TestInlineGraphic extends Sprite
private var redRect:Sprite=null;
public function TestInlineGraphic()
var textFlow:TextFlow = TextConverter.importToFlow( "How now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
textFlow.flowComposer.addController( new ContainerController( this ));
var editManager:EditManager = new EditManager( new UndoManager() );
textFlow.interactionManager = editManager;
textFlow.flowComposer.updateAllControllers();
editManager.selectRange( 3,  3);
editManager.insertInlineGraphic( drawRect(), 20, 20, "none" );
function drawRect():Sprite
redRect  = new Sprite ();
redRect.graphics.beginFill(0xff0000);    // red
redRect.graphics.drawRect(0,0,30, 30);
redRect.graphics.endFill();
var number:TextField =new TextField();
number.text = "1";
number.width=20;
number.height=20;
redRect.addChild(number);
return redRect;

Similar Messages

  • How can I write text in front of attachments?

    I want to send five PDFs by email. When I highlight and click email, the attachments appear in the message body.  I want to write text before these attachments but I can't seem to be able to move the cursor in front of the first picture. Does anyone know how I can do this? Or send the attachments as thumbnails?

    Hello Biojem,
    This can be done by right-clicking the PDFs as they appear in Mail, then choosing "View as Icon."
    To change the way the PDF file is displayed in the current message window, Control-click the icon or visible portion of the PDF and choose "View in Place" or "View as Icon" as appropriate from the shortcut menu. Note that this only affects how you see the PDF in this message's window, it is not a permanent change.
    Mac OS X Mail: About PDF attachments
    http://support.apple.com/kb/TA22343
    Cheers,
    Allen

  • I have made a book of my I Photo pictures. In certain layouts there is a textframe. How can I avoid the frame becoming visible in the print if I don't want to write anything? Should I just leave it or should I delete the text "Write your text here" ?

    I have made a book of my iPhoto pictures. In certain layouts there is a text frame. How can I avoid the frame becoming visible in the print if I don't want to write anything?  Should I just leave it untouched or should I delete the instructing text "Write your text here"?

    Most pages have layouts for pictures only or pictures with text boxes. Either select the same layout for that page but the one without the text box or put a space in the text box.
    Putting a space in the text box will avoid getting the warning when ordering that there's an unfilled text box in the book. The box will not be visible in the final product.  You can and should check the book before ordering by previewing it as described in this Apple document: iPhoto '11: Preview a book, card, or calendar before you order or print it
    Happy Holidays

  • I want to recolor an imported graphic--not copy writted. Any Suggestions?

    I want to recolor an imported graphic--not copy writted in Pages. Any Suggestions?

    I've transmitted the answer to you telepathically.
    Let me know if you got it, and if you want any details.
    Petre

  • How to write text over a picture in Pages 5.0?

    In a Pages 5.0 document I want to write a text over a picture. This text will allways stay 'behind' the picture.
    I can change the order of the picture (in front of at the back), but the text will not become visable.
    It did work in Pages '09...
    What am I doing wrong?
    For for helping me...

    Assuming your text is in your document, and you insert a picture. While the picture is selected, you will notice that on the right format panel, the Arrange tab has appeared. Select either Stay on Page, or Move with Text — depending on your image goal — and then look at the Text Wrap feature. By default, once you drop a picture into the document, it is set to Automatic. This means you can place your pointer in the image and just move it around, while text flows around it. The smaller the image the better the flow effect. This is a discussion about Pages v5.2.2, but it will work the same in v5.5.
    Let's say you want the image flush aligned to the left margin, but want text to flow above, to the right, and below the image. Change text wrap automatic to Around, select the right icon for Text Fit, and adjust your spacing up or down for the proximity of the text wrap to the image. It looks like this with Text Fit spacing set to 9 pt.

  • Is it possible to do a GLOBAL color change for both text and graphics in ACrobat XI?

    I used to do this using the Pitstop Pro plugin but now Pitstop is almost $900 and this is the only thing that I would use it for, not worth the investment
    I can change text color by selecting individual text items, but I want to change all of the red text into white text
    I also need to change all of the red graphics into white graphics and I can't figure out how to do that either
    I have a trial version of XI on a Mac and will buy it if it can do what I am trying to do, i.e. global color changes to both text and graphics
    thanks!!

    I have version 6, but it is way out of date, doesn't work on my current system, I downloaded a trial version of the new one, version 12 I think, now I have to decide if I can afford to buy it, it is not cheap!
    oops, sorry, I didn't read your entire message, aargh!
    I'll check with them if I can upgrade from this early version, thanks for the suggestion!
    (edited because I didn't read properly!)

  • Automatically adding alt text to graphics

    Here is a pie-in-the-sky project that is way beyond my abilities. Anyone up for that challenge will have my (and probably other's) endless gratitude.
    I would like a script that creates an "alt text" for graphics based on the text of its caption in the document.
    The structure would be something along the lines of:
    1. Enumerating each anchored frame that contains a graphic
         a. Testing to see if a specific paragraph style follows the anchored frame
         b. If exists, selecting the text of that specific paragraph style
         c. Setting the "Alternate" object property of the anchored frame
    So after most graphics we have a caption using a "Figure Title" paragraph style. The script should create the text like: "This image is a screen shot of " + figTitle. Then populate the Alternate field of the Object Attributes dialog box of the Object Properties of the anchored frame.

    Milo--
    While I'm not volunteering to write the script, I would encourage you to tackle it yourself. It is hardly a pie-in-the-sky project, and if you have any desire to expand your abilities, this would be a worthwhile exercise.
    You've already taken the first step by outlining the basic structure.
    There are several threads you might find useful in putting it all together
    http://forums.adobe.com/thread/959627?tstart=0 --The main subject is about deleting aframes, but it spends a bit of time discussing how to iterate through all the frames in a document and determining their contents.
    http://extendingframemaker.blogspot.com/2012/01/getting-elements-text.html --While the listed subject is getting text from an element, the approach is very similar to how you get text from a paragraph
    http://forums.adobe.com/thread/926370?tstart=0 --Regarding setting attribute values

  • HTML Code query - does iweb turn my text to graphics?

    Hello
    I'm a bit of a novice but thanks to iWeb I've been able to build myself quite a competent commercial website. As the company is growing I'm suffering from the problem of not being able to edit the code until the site is published - as I have a shopping cart on the site there is a lot of code to input every time I want to make a small change. Also, because I am trying to optimise my profile in the search engines I have to add a lot of title and description words at the front end of every page after it's published. Because of this I decided to import the site into Dreamweaver and see if I could edit the code there. As a result I noticed that the imported iWeb pages showed my text boxes as a graphic and I couldn't click on the text and edit. This got me worrying that search engines too were seeing all my carefully worded text as graphics instead of words which in my understanding would hinder the site slightly when it comes to SEO. I found Dreamweaver slightly exceeded my capabilities - for now - so I am left inputting HTML as before but I am very worried about this graphics issue - does anyone know if this is the case?
    Thank you in advance
    The website is http://www.thelittlethings.info
    Message was edited by: LoveTheLittleThings

    Thank you - I'm not an expert either and thank you for your suggestion. I have looked at the source as you say but the code at the front of the main text panels says . . .
    <img usemap="#map3" id="shapeimage_11" src="Boys%203-5%20years%20files/shapeimage11.png"
    and .png is a graphic isn't it?
    Very confused and my knowledge of Dreamweaver is so limited that I wouldn't know why it would translate the text into a graphic panel if it isn't.
    Please help - I don't want to work on my seo so hard if it's a fruitless task

  • Write Text Data Array to text file

    Greetings all. I hope someone can help me as I am really under the gun. The attached vi shows the basics of what I am trying to do. I have already written a vi that takes the Cal Data Array and prints it out in a nicely formatted report. My problem is that the powers that be also want the data saved to a generic text file that can be copied and printed out anywhere they like. As such, I need to save the data to a generic text file in column format such that it will all fit on one page in landscape mode. There are a total of 12 columns of data. I have been trying to create something that would format each column to a specific length instead of them all being the same. No luck so far. Basically, I need columns 1,2,3,8 and 12 to be length of 5. The rest a length of 9. I have tried to place the formatting part in a for loop with the formatting in a case, but it does not appear to work. I really need this quick so if anyone has any ideas, please help. As always, I really appreciate the assistance.
    Thanks,
    Frank
    Attachments:
    Write Cal Data to Text File.vi ‏21 KB

    pincpanter's is a good solution. Beat me to it while I was away building an example. Similiar approach using two for loops and case statement. Here is my suggestion anyway....
    cheers
    David
    Message Edited by David Crawford on 11-23-2005 09:37 AM
    Attachments:
    Write Text Data Array to text file.vi ‏31 KB

  • Write text to picture and save it

    Hi!
    What I want to do is to write a text (e.g. a date) to a picture. It should be displayed in picture control and saved to jpeg-file.
    Aquiring the image and saving it works well. But how do I write text to it??? I do not have the Vision-toolkit. Is there any other way??
    Thanks
    Starter

    Hi,
    Saving the contents on the picture control to a jpg can be done using the Invoke node "Get Image" method. This will return the parameters required for the "Write JPEG File.vi".
    I have attached a VI to demonstrate this....
    P.S Its another one of those LabVIEW things that is straightforward, but is mind boggling to figure out yourself. =)
    Charles ElBayeh
    Applications Engineer
    Madry Technologies, NI Alliance Member
    www.madry.com.au
    Attachments:
    Text_on_JPG.vi ‏45 KB

  • Want to write my personal Arch_Install Script, help please..

    Hi, guys, I want to write a script to make my arch-installation automatic. The following is my personal procedures I follow to install my Arch.
    I am wondering is there any way I can make it automatic instead of input every command manually, for example starting from "Adduser" after reboot after the base installation, can I make the rest run automatically by a script?
    Will it work if I simply write all commands one by one in each line into a text file, and exec it after chmod +x ?
    Or any suggestions?
    Thanks. :)
    ARCHLICH INSTALLATION
          <=============================boot==============================>
    1. Install Base system from FTP/HTTP-USB
    2. Configure system:
       1)rc.conf (HOSTNAME="home")
       2)etc/hosts (".. localhost home")
       3)locale.gen
       4)Root password
    3. Grub Install, change waiting time from 5 to 0.
          >=============================Reboot==============================<
    1. Adduser (tty,disk,video,audio,optical,storage,wheel) seperat by a single ","
    2. Setup sudo
       1)pacman -S sudo
       2)nano /etc/sudoers (uncomment "%wheel  ALL=(ALL) ALL")
    3. Xorg, driver, xorg.conf
       1)pacman -Sy xorg-server xorg-xinit xf86-input-mouse xf86-input-keyboard
       2)pacman -Sy nvidia
       3)mkdir "/mnt/backup" and mount /dev/sdb1
       4)copy xorg.conf from /mnt/backup/linux-backup/arch to /etc/X11
    4. Fonts & Scim (scim is configured later)
       1)pacman -Sy ttf-dejavu
       2)pacman -Sy ttf-ms-fonts artwiz-fonts
       3)pamcna -Sy terminus-font
       4)pacman -Sy ttf-arphic-uming ttf-arphic-ukai ttf-fireflysung
       5)pacman -Sy scim scim-pinyin
    5. Install OpenBox and Thunar
       1)openbox, lxappearance, gtk2-themes-collection, openbox-themes, nitrogen
       2)gamin, thunar, unrar, unzip, xarchiver, thunar-archive-plugin
       3)mousepad, rxvt-unicode, gqview
       4)MODULES=(!soundcore)
       5)DAEMONS=(.. dbus hal)
    6. nano /etc/inittab
       1)id:5:initdefault:  (unmoment the one with 3)
       2)comment out agetty3-6
       3)add the following line to the bottom and uncomment others:
        x:5:once:/bin/su kevin -l -c "/bin/bash --login -c startx >/dev/null 2>&1"
    7. log into kevin
       1)mkdir .config and cp openbox into it from backup
       2)mkdir .themes and cp DarkFiber into it from backup
       3)nano .xinitrc add "exec openbox-session"
       4)cp .Xdefaults to  ~/ from backup
          >=============================Reboot==============================<
    0. Mount sdb1 as root and cp .bashrc_root to root's home as .bashrc
    1. Exit to kevin and cp .bashrc to kevin's home.
    2. Install cpu-frequency
       1)pacman -S cpufrequtils
       2)nano /etc/conf.d/cpufreq:
                           min_freq="2GHz"
                           max_freq="2.7GHz"
    3. lm_sensors
       1)pacman -Sy lm_sensors
       2)sensors-detect
    4. NumbLock
       1)pacman -S numlockx
       2)add it to ~/.xinitrc:
    numlockx &
    nitrogen --restore &
    #conky &
    exec openbox-session
    5. Install OSS
       1)pacman -S oss
    6. Install Openntpd to adjust your computer time.
       1)pacman -S openntpd
    7. Diable IPv6 Module, mousepad /etc/modprobe.conf, and add:
    # disable autoload of ipv6
    alias net-pf-10 off
    8. Copy PolicyKit.conf from backup to /etc/PolicyKit/, for USB to auto-mount.
    9. Edit MODULES and DAEMONS:
    MODULES=(!soundcore powernow-k8 cpufreq_ondemand)
    DAEMONS=(syslog-ng network netfs crond dbus hal cpufreq sensors oss)    [Optional: preload]
    10. Add /etc/sudoers.(!Remember to have a new line in the end!)
    %users   ALL=NOPASSWD:/sbin/shutdown
    11. Edit /etc/fstab,(copy the 2 lines from /arch/fstab in backup)
      1)use nitrogen to change wallpaper
          >=============================Reboot==============================<
                                 APPLICATION INSTALLATION
          >================================================================<
    0. obmenu, obconf, librsvg
    1. firefox, flashplugin
    2. mplayer, mplayer-plugin, codecs
    4. cd /backup/linux: pacman -U mpg123-oss-TAB [ossxmix to diable vmix]
    5. openoffice-base, jre
    6. emacs (copy .emacs .virc to ~/ to prevent *~ file)(M-x custmize-variable RET
       latex-run-command RET, then change latex into pdflatex)
    7. texlive-most
    8. conky [edit .xinitrc to auto-start conky]
       (cp .conkrc and .weather and chmod +x .weather)
    9. tuxguitar
    10. openssh, sshfs
       1)mkdir .ssh, then as root cp private key to .ssh
       2)mkdir /mnt/yzhao and chown kevin:users /yzhao
                          nano /etc/pacman.conf
    [kdemod-legacy]
    Server = http://mirror.rit.edu/kdemod/legacy/i686
           <=====================OR=======================>
    [kdemod-legacy]
    Server = http://mirror.rit.edu/kdemod/legacy/x86_64
    11. kdemod3-kdegraphics-kdvi, kdemod3-kdegraphics-kpdf
    12. kile, k3b
    13. Add ":/opt/kde/bin" to /etc/profile, to use kde applications.
    14. Configure Scim to be usable, add to /etc/profile:
    export XMODIFIERS=@im=SCIM
    export GTK_IM_MODULE="scim"
    export QT_IM_MODULE="scim"
    scim -d
    15. deluge, pidgin [diable system tray, ossplay %s]
          <=============================End==============================>
    Last edited by yingwuzhao (2009-04-04 21:12:20)

    Well if you want to do all that, you obviously need to learn about bash scripting.
    You can also have a look at the automatic procedure from aif, which is made exactly for automatic installations.  See http://bbs.archlinux.org/viewtopic.php?id=58110

  • How to write text file in Shockwave?

    Does anybody know how to write text file in Shockwave to
    user's disk?
    Thanks in advance.

    Those Xtras can wreak to much havoc when used with the wrong
    intent.
    What you can do is write with setpref and store a list of
    saves and the
    saves itself seperatly. Then you'd have to build your own
    save/open
    dialog to let the user:
    * pick a previously saved file to load or overwrite
    * have the user type the name of a new file to save.
    Only thing that remains is that the user cannot decide where
    the files
    are saved.
    Manno
    SiuLinda wrote:
    > Thanks a lot for your reply.
    > Yes, cookies is good but I have to write a program to
    save the text file in
    > where the user wants, user can open these files later if
    they like, like using
    > Filextra and Fileio, but I found all of these xtras seem
    to be not supported in
    > shockwave.
    >
    Manno Bult
    [email protected]

  • How in Illustrator I write text with transparent background ?

    How in Illustrator I write text with transparent background ?

    that is correct. You open it in AI and you have an option to use area text, you first take the text tool and drag to make a text frame, which wors like it does in a layout program. Or you click the text tool any where on the canvas and just start typing if you want to make another line you either hit the return (enter) key or for  soft return use shift/return (enter).
    The default is a transparent background.
    All art i Illustrator is on a transparent background unless you add an object behind other objects that has a fill color.

  • Wanted a popup text box

    Hi all,
    I want a popup text box.
    My logic is like this:
    when ever i select one record and press pushbutton which is located at application toolbar, than one popup text box must display so that they will write some reason for that action and that reason must save in the "ZTABLE".
    thanking u...
    regards,
    giri.

    Hi, See this. it is usefull for you as per your requirement.
    Step 1. you have to create text object using SE75.
    Step 2. follow below program of text box editor.
    step 3. call this editor function when user press button.
    Step 4 .you need to create screen as per program for container.
    program is:
    *& Module pool       ZEDITOR1
    *& Program to Read text, edit text and save text using editor screen
    *& For this program create sap script object using SE75
    PROGRAM  ZEDITOR1.
    *Varriable declaration
    DATA: G_CONTAINER1 TYPE SCRFNAME VALUE 'TEXT' ,
          TEXT1  TYPE REF TO CL_GUI_TEXTEDIT , " declaration to create object
          G_CUSTOM_CONTAINER1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER .
    CONSTANTS: LINE_LENGTH TYPE I VALUE 256.
    DATA: OK_CODE LIKE SY-UCOMM.
    DATA : ED_NAME   LIKE  THEAD-TDNAME ,
           ED_OBJECT LIKE  THEAD-TDOBJECT ,
           ED_HEADER LIKE  THEAD ,
           ED_LINES  LIKE  TLINE OCCURS 0 WITH HEADER LINE ,
           ED_TITLE  LIKE  TTXIT-TDTEXT .
    CONSTANTS: C_LINE_LENGTH TYPE I VALUE 256.
    define table type for data exchange
    TYPES: BEGIN OF MYTABLE_LINE,
             LINE(C_LINE_LENGTH) TYPE C,
           END OF MYTABLE_LINE.
    table to exchange text
    DATA : G_MYTABLE TYPE TABLE OF MYTABLE_LINE.
    DATA : G_WA LIKE  LINE OF  G_MYTABLE.
    DATA:ZSR(5) VALUE 'TX'.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'EDIT_100'.
    SET TITLEBAR 'xxx'.
    Initialize container of editor screen
      IF G_CUSTOM_CONTAINER1 IS INITIAL.
        CREATE OBJECT G_CUSTOM_CONTAINER1
               EXPORTING CONTAINER_NAME = G_CONTAINER1.
        CREATE OBJECT TEXT1
          EXPORTING
            PARENT = G_CUSTOM_CONTAINER1
            WORDWRAP_MODE = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
            WORDWRAP_POSITION = LINE_LENGTH
            WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Form  read_text_in_editor
          text
    FORM READ_TEXT_IN_EDITOR .
      ED_NAME = ZSR.                                            "'ZTEST2'.
    ED_OBJECT = 'ZMAT' .
      ED_OBJECT = 'ZRAJ1'. "ZALOK' .
    *--- For Reading Inspection Remarks Related text
      CLEAR: ED_LINES[],ED_LINES,G_MYTABLE[],G_MYTABLE.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          CLIENT                  = SY-MANDT
          ID                      = '01'
          LANGUAGE                = SY-LANGU
          NAME                    = ED_NAME
          OBJECT                  = ED_OBJECT
         IMPORTING
           HEADER                  = ED_HEADER
        TABLES
          LINES                   = ED_LINES
        EXCEPTIONS
          ID                      = 1
          LANGUAGE                = 2
          NAME                    = 3
          NOT_FOUND               = 4
          OBJECT                  = 5
          REFERENCE_CHECK         = 6
          WRONG_ACCESS_TO_ARCHIVE = 7
          OTHERS                  = 8.
      IF ED_LINES[] IS NOT INITIAL.
        LOOP AT ED_LINES .
          G_WA-LINE = ED_LINES-TDLINE .
          APPEND G_WA TO G_MYTABLE .
          CLEAR  G_WA.
        ENDLOOP .
      ENDIF.
        PERFORM MOVE_TO_EDITOR.
    ENDFORM.                    " READ_TEXT_IN_EDITOR
    *&      Form  MOVE_TO_EDITOR
          text
    FORM MOVE_TO_EDITOR.
      CALL METHOD CL_GUI_CFW=>FLUSH
        EXCEPTIONS
          OTHERS = 1.
      CALL METHOD TEXT1->SET_TEXT_AS_R3TABLE
        EXPORTING
          TABLE  = G_MYTABLE
        EXCEPTIONS
          OTHERS = 1.
    ENDFORM.                    "MOVE_TO_EDITOR
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE OK_CODE.
        WHEN 'CLEA'.
          CLEAR: ED_LINES[],ED_LINES,G_MYTABLE[],G_MYTABLE.
          PERFORM MOVE_TO_EDITOR.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'DISP'.
          IF ZSR IS INITIAL.
            MESSAGE 'Enter Text No.' TYPE 'S'.
          ELSE.
            PERFORM READ_TEXT_IN_EDITOR .
          ENDIF.
        WHEN 'SAVE'.
          PERFORM SAVE_DATA.
      ENDCASE.
      CLEAR: OK_CODE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  SAVE_DATA
          text
    FORM SAVE_DATA .
      CALL METHOD TEXT1->GET_TEXT_AS_R3TABLE
        IMPORTING
          TABLE  = G_MYTABLE
        EXCEPTIONS
          OTHERS = 1.
      CALL METHOD CL_GUI_CFW=>FLUSH
        EXCEPTIONS
          OTHERS = 1.
      CLEAR : ED_LINES, ED_LINES[] .
      LOOP AT G_MYTABLE INTO G_WA .
        MOVE G_WA-LINE TO ED_LINES-TDLINE .
        APPEND ED_LINES .
        CLEAR  ED_LINES .
      ENDLOOP.
    ED_HEADER-TDOBJECT = 'ZMAT' .
      ED_HEADER-TDOBJECT = 'ZRAJ1'. "ZALOK' .
      ED_HEADER-TDNAME =  ZSR. "'ZTEST2'.              "ED_NAME .
    ED_HEADER-TDID = 'ZMAT'.
      ED_HEADER-TDID = '01'.
      ED_HEADER-TDSPRAS = SY-LANGU.
      ED_HEADER-TDLINESIZE = '072'.
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
          CLIENT          = SY-MANDT
          HEADER          = ED_HEADER
          SAVEMODE_DIRECT = 'X'
        TABLES
          LINES           = ED_LINES
        EXCEPTIONS
          ID              = 1
          LANGUAGE        = 2
          NAME            = 3
          OBJECT          = 4
          OTHERS          = 5.
      IF SY-SUBRC <> 0.
        CASE SY-SUBRC.
          WHEN '5'.
            MESSAGE E002(SY) WITH 'IPL' .
          WHEN '1'.
            MESSAGE E002(SY) WITH 'IPL1'.
        ENDCASE.
      ENDIF.
    ENDFORM.                    " SAVE_DATA

  • Write text to graph

    Hello, guys, I wrote a code to write text into the graph, however, I don't quite like the way it works (save image, read image into a picture, add text, save again). Do you have any suggestions ?
    Any help will be appreciated!
    Best
    Camu
    Attachments:
    Saving.vi ‏34 KB

    That's not what you initially said. You initially said you wanted to draw inside the graph.
    If you want to draw the text while the graph is displayed on the front panel and have it visible while the code is running you can place a transparent picture control over the graph and simply draw the text on this picture control. Doing this will prevent you from using the graph palette for zooming and using cursors since the picture control will receive the mouse clicks. When you want to export the combined image you just need to get the graph image and merge it with the picture control.
    If, on the other hand, you just want to add the text when you save it, then you can do so by getting the graph image and drawing on it before you save:
    Message Edited by smercurio_fc on 06-25-2008 01:48 PM
    Attachments:
    Example_VI.png ‏13 KB

Maybe you are looking for