How to associate a tooltip to a scatterGraph annotation

I am not sure if it is the best way to do it, but I need a graph with many annotations (or it could be many "single point" XYgraph curve). Each annotations should show a string tooltip (not the X, Y coordinate). How do I create the mouse hover event for an annotations (or how do I change the "tooltip" of a "single point" XY curve)?

Hello Elton
I had to make some changes for VB, but because I don't need the caption and arrow things from the annotations, I finaly got something, thanks to you.
Here my code (where scgJames is the Graph, and JamesXpas is the Xaxis)
Private Sub scgJames_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles scgJames.Click
Dim ThisAnnotation As XYAnnotation
Dim mousePoint As Point
mousePoint = scgJames.PointToClient(Control.MousePosition)
ThisAnnotation = scgJames.GetAnnotationAt(mousePoint.X, mousePoint.Y)
Try
'if the axis are not the same, there will be an error and it won't be processed
If ThisAnnotation.XAxis Is JamesXpas Then
MessageBox.Show(ThisAnnotation.Caption)
End If
Catch ex As Exception
End Try
End Sub
when I create the annotations, I make sure to set these values, so the caption from each annotations are not visible, but the annotation itself is visible:
myAnnotationPoint.ArrowVisible = False
myAnnotationPoint.Caption = "whatever I want to put"
myAnnotationPoint.CaptionAlignment = New NationalInstruments.UI.AnnotationCaptionAlignment(NationalInstruments.UI.BoundsAlignment.BottomLeft, 0.0!, 0.0!)
myAnnotationPoint.CaptionFont = New System.Drawing.Font("Microsoft Sans Serif", 1.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
myAnnotationPoint.CaptionForeColor = scgJames.ForeColor
with the code you gave me, if I click on the annotation I got a message box showing the caption from the annotation!
Thanks again
There are so much things to learn!
Lew

Similar Messages

  • How do I use Tooltip in a thread?

    Hello Everyone.
    I'm trying to use Tooltip in a (added) thread, but I've got IlligalStateException.
    Task task = new Task<Void>() {
        @Override
        protected Void call() throws Exception {
            Tooltip tooltip = new Tooltip();
            return null;
    new Tread(task).start();NetBeans 7.1
    JDK 1.6.0_30
    JavaFX 2.0.1
    I can use other controls (like Button, etc).
    Thank you in advance.

    How do I use Tooltip in a thread? You can only create Tooltips on the JavaFX Application Thread due to this bug: http://javafx-jira.kenai.com/browse/RT-17716

  • How to associate lines in a text file as an elements of the Vector?

    Hi!
    I have used BufferedReader(new FileReader(c:/java/MyText.txt)) to read from MyText.txt file. Now I know how to load content of this file (every line in file describes each photo in my photo-set) into a Vector. But how to associate lines of MyText.txt as an elements of the Vector?
    Thanks Felipe for his help.
    DM.

    Thank you telism,
    Let me tell you the whole story.
    I'm trying to write an application which has to show my image files (set of photos) with a text description. The list of image files placed into the JList. So, when I select a file from the JList it shows me an image (everything is OK).
    But, every image has it's text description in MyText.text file. It's a file with each text line for every image. Actually, I am trying to connect two actions - showing my image and setting it's specified text line description (from MyText.txt) in a JTextArea. I thought that the best way to do this with my text it is like I did it with my images through Vector. But No Success.
    Can You help me on that? If You will show me how to do it on my example I will really appreciate it.
    Thank You DM.
    Here is my application:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class UnitA extends JPanel implements ListSelectionListener {
    BasicUnitA Myapplet;
    JPanel listPanel, picturePanel;
    Vector imageNames1;
    JList list1;
    JLabel picture1;
    JScrollPane listScrollPane1, pictureScrollPane1, TSP1;
    JTextArea TA1;
    int index;
    UnitA (BasicUnitA parent, boolean p1, boolean p2) {
    Myapplet=parent;
    //Read image names from a properties file
    ResourceBundle imageResource1;
    try{
    imageResource1 = ResourceBundle.getBundle("imagenames1");
    String imageNamesString1 = imageResource1.getString("images");
    imageNames1 = parseList(imageNamesString1);
    } catch (MissingResourceException e) {
    System.err.println("Please, add properties file with image names.");
    System.exit(1);
    //Create one list of images and put it in a scroll pane and panel
    list1 = new JList(imageNames1);
    list1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    list1.setSelectedIndex(0);
    list1.addListSelectionListener(this);
    listScrollPane1 = new JScrollPane(list1);
    listScrollPane1.setPreferredSize(new Dimension (120,120));
    //Set up the picture label and put it in a scroll pane
    ImageIcon firstImage1 = new ImageIcon("java/Applications/images/fotos/" +
    (String)imageNames1.firstElement());
    picture1 = new JLabel(firstImage1);
    picture1.setPreferredSize(new Dimension (firstImage1.getIconWidth(),
    firstImage1.getIconHeight()));
    pictureScrollPane1 = new JScrollPane(picture1);
    pictureScrollPane1.setPreferredSize(new Dimension (500,360));
    pictureScrollPane1.setBorder(BorderFactory.createCompoundBorder(
    BorderFactory.createCompoundBorder(
    BorderFactory.createLoweredBevelBorder(),
    BorderFactory.createEmptyBorder(5,5,5,5)),
    BorderFactory.createLineBorder(Color.black)));
    pictureScrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLL
    BAR_ALWAYS);
    TA1 = new JTextArea();
    TA1.setLineWrap(true);
    TA1.setWrapStyleWord(true);
    TA1.setEditable(false);
    TA1.setFont(new Font("Serif", Font.PLAIN, 16));
    TSP1 = new JScrollPane(TA1);
    TSP1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_
    ALWAYS);
    TSP1.setPreferredSize(new Dimension(500,40));
    TSP1.setBorder(BorderFactory.createCompoundBorder(
    BorderFactory.createCompoundBorder(
    BorderFactory.createLoweredBevelBorder(),
    BorderFactory.createEmptyBorder(5,5,5,5)),
    BorderFactory.createLineBorder(Color.black)));
    public void valueChanged(ListSelectionEvent e) {
    if (e.getValueIsAdjusting()) return;
    JList theList1 = (JList)e.getSource();
    if (theList1.isSelectionEmpty()) {
    picture1.setIcon(null);
    TA1.setText(null);
    } else {
    index = theList1.getSelectedIndex();
    ImageIcon newImage1 = new
    ImageIcon("java/Applications/images/fotos/" +
    (String)imageNames1.elementAt(index));
    picture1.setIcon(newImage1);
    picture1.setPreferredSize(new Dimension (newImage1.getIconWidth(),
    newImage1.getIconHeight()));
    picture1.revalidate();
    try{
    BufferedReader reader = new
    BufferedReader(new FileReader("c:/java/Applications/MyText.txt")));
    String str;
    while((str = reader.readLine()) != null) {
    TA1.setText(TA1.getText()+str);
    reader.close();
    }catch(IOException evt){};
    protected static Vector parseList(String theStringList) {
    Vector v = new Vector(10);
    StringTokenizer tokenizer = new StringTokenizer (theStringList, " ");
    while (tokenizer.hasMoreTokens()) {
    String image = tokenizer.nextToken();
    v.addElement(image);
    return v;

  • How to associate a test message with a change document

    I am using solution manager 7.01.
    accessing my change documents through the workcenter I need to create a new test message - so I use the Create transaction button on the button bar, Service Process, Test Message
    Then I am in the create test message screen.  However from here I cannot see how to associate my test message with either the change document that I was processing or to the maintenance cycle.
    Ideally I want to link the test message to the change document however at least to the maintenance cycle.
    How do I do this?
    Am I creating the test message in an incorrect way?
    regards
    Marina

    Anyone?  Does no one use Test Messages?

  • How to associate 1997-2003 Word doc files with Word 2010?

    Hi
    I am surprised not to be able to find out how to associate word 1997-2003 Word files with Wrod 2010. The object is to have Word 2010 open the document when I click on the document. Many of my Word 1997-2003 documents were created using Word 2010.
    When I try to use the associations function in Windows 7 I cannot find the Word program. Checking "Properties" on the Word Icon leads to a program called "CVH.EXE" which does nothing when I try to open doc files with it.
    Thank you.
    David
    lifeform23

    Hi,
    From your description , I understand that you want to open the prior Word doc files  in Word 2010.
    You can refer to the KB article that resolve this issue:
    How to open and save Word, Excel, and PowerPoint 2007 or 2010 files in earlier versions of Office programs
    http://support.microsoft.com/kb/924074
    Sincerely,
    Harry 

  • How to associate a button with the selection/unselection of a JTable?

    hi,
    how to associate a button with JTable in this manna? i want to disable a button once there is no selection in the JTable, and enable the button when there is a selection. to associate the selection it is easy: just make an eventAction for the button on the click in the JTable and check whether there is a selection. but how to do this with the unselection? hope anyone can give me any hint. thanx!

    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JFrame {
        String[] head = {"One","Two","Three"};
        String[][] data = {{"1-1","1-2","1-3"},{"2-1","2-2","2-3"},{"3-1","3-2","3-3"}};
        JTable jt = new JTable(data,head);
        public Test() {
         setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
         Container content = getContentPane();
         content.add(new JScrollPane(jt));
         jt.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
             public void valueChanged(ListSelectionEvent lse) {
              if (lse.getValueIsAdjusting()) return;
              if (jt.getSelectionModel().isSelectionEmpty()) {
                  System.out.println("Nothing Selected");
              } else {
                  System.out.println("Something Selected");
         setSize(500,500);
         show();
        public static void main( String args[] ) { new Test(); }
    }

  • How to Associate a existing contact to a existing Account using file based import in Oracle sales cloud

    How to Associate a existing contact to a existing Account using file based import in Oracle sales cloud

    Hello,
    You can use this mapping in order to associate contacts with existing Accounts: This will relate the previously imported Contact with an existing Account.
    Regards,
    Oana

  • How to associate an xml from httpservice to datagrid if the xml element name contains periods in it

    Following is the xml from an http service, how to associate
    this xml to a data grid (employee name, number) since it contains
    periods(dots) in xml element name.
    An early help is appreciated.....
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <com.companyx>
    <person>
    <employee.data>
    <employee.name>mrx</employee.name>
    <employee.number>1001</employee.number>
    </employee.data>
    <employee.data>
    <employee.name>mry</employee.name>
    <employee.number>1002</employee.number>
    </employee.data>
    <employee.data>
    <employee.name>mrz</employee.name>
    <employee.number>1003</employee.number>
    </employee.data>
    <page>0</page>
    </person>
    </com.companyx>
    Thanks,
    Vijay Karthik

    HI
    GOOD
    IT IS POSSIBLE IN ABAP
    Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.
    XSD->
    XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. in more detail.
    XDS->
    XDS can process data images from CCD-, imaging-plate, and multiwire-detectors in a variety of formats. Detector specific Input file templates greatly simplify the use of XDS; they are provided as part of the documentation.
    XDS runs under Unix or Linux on a single server or a grid of up to 99 machines of the same type managed by the MOSIX system; in addition, by using OpenMP, it can be executed in parallel on up to 32 processors at each node that share the same address space.
    http://www2.stylusstudio.com/SSDN/default.asp?action=9&fid=23&read=2926
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    THANKS
    MRUTYUN

  • How can we use "tooltip " option in heirarchical tree item in oracle 11g?

    how can we use "tooltip " option in heirarchical tree item properties in oracle 11g forms?

    hi user11973188
    how can we use "tooltip " option in heirarchical tree item properties in oracle 11g forms?isn't it exist in the tree item's property itself... ?!
    Regards,
    Abdetu...

  • How do you get Tooltips to stay visible long enough to read them?

    When I move my mouse over something that generates a ToolTip, the tip flashes on for a microsecond....too short of a time to read it.  Does anyone know how to make the tooltips in Lightroom stay on long enough to read?  Thanks.

    I don't have that trouble on Win XP, LR 3.4, and never have. Could it be a problem with your mouse driver?
    Hal

  • Transferred my Library to new laptop, but how to associate/sync iPhone with new laptop?

    I got a new laptop. The old laptop is still working. I transferred my library using the Home Sharing method and all of my items were moved except my apps. I plugged in my iPhone to the new computer and used "Transfer Purchases from iPhone" option and all of my apps were added to the library. But, now I don't know how to associate the iPhone with the new computer. When I plug in my iPhone to the new computer. It starts to sync. It says steps 1 through 3, spins for 20 seconds and says complete, but nothing was done. I do not get the "this iPhone is associated with another library" message when I plug it in to new computer, perhaps because I've authorized both computers. All I can find in my searches is how to avoid losing all of your data and how to transfer your library, but none has dealt with this exact situation. I am stumped as to how to get iPhone associated with new computer. Can I transfer my backup from the old computer and restore from backup? Other thoughts? Sorry if the answer is somewhere (I'm sure it is), but I have spent two days looking.

    Randers4, so I carefully followed the directions (only one that confused me was about adding a fake address/calendar entry, is that for Macs, I'm using a PC?.)  I restored it from the backup and everything looked good. I had hope, the final step says to sync it and when I did, I had the exact same problem. It spun, went quickly through only 3 steps (even though there were 7 sync steps with my old laptop) and nothing changed. It clearly didn't sync.
    So, I had an idea that I would back up everything by right clicking in the left pane and forcing a back up on the new computer, and then erasing the entire phone and then restoring from the backup I just made to see if that would make a difference. So, after I tried that and it restored, it was weird. All of my settings were there. Some folders were there, my pictures were there, but all of my apps, folders, music and video was missing and it still wouldn't sync. So, then I had to plug it back into my old laptop and do a restore from there to get that stuff back.
    Shouldn't I get a message when I plug the iPhone into the new laptop saying this phone is connected to another computer? I tried "Reset Warning Messages" but it doesn't do anything. At this point, I don't care if I lose some of the stuff from my iPhone (texts, etc)...but I want it to sync to the new computer because my old laptop is on its death bed.
    So frustrating, all of my iTunes content is on the new computer, the only piece that is missing is getting it to "talk" to the iPhone. Times like this I wish I wasn't a poor teacher and could afford to get a nice Mac laptop.

  • How to associate a default catalog to CatalogTools in 10.2

    Hi Guys,
    Can you throw your ideas.
    how to associate a default catalog to CatalogTools in 10.2.
    can i associate catalog to user through scenario in ATG10.2 ?
    Thank you.

    Hi
    Below is the Code Snippet to Associate a Catalog to Profile Write one Servlet in pipeline place below code.
    Profile profile = (Profile) atg.servlet.ServletUtil.getCurrentUserProfile();
            Object userCatalog = profile.getPropertyValue(CATALOG_PROPERTY_NAME);
            if ((userCatalog == null)) {
                try {
                    RepositoryItem catalog = (RepositoryItem) getProductCatalog().getItem(getCatalogId(),
                            CATALOG_PROPERTY_NAME);
                    profile.setPropertyValue(CATALOG_PROPERTY_NAME, catalog);
                }  catch (RepositoryException e) {
                    getLogger().logError(ApplicationConstants.ERR_CORE_CATALOG_ASSOCITOR_FAIL, e.getCause());
    In component properties file mention
    catalogId=catalog600000
    It will Assign above Catalog to Profile as Default.
    -user8729783

  • How to associate a T-CODE to an infoset or a quick view? sq01/sq02

    How to associate a T-CODE to an infoset or a quick view? sq01/sq02

    Hi , Try out these steps :
    Pre requisites.
    1. User group name where the Infoset is assigned to
    2. Query name.
    Steps.
    1. Go to SE93
    2. Put your transaction name.
    3. Click on Create.
    4. Input a short text.
    5. Select "Transaction with Parameters" radio button.
    6. Enter "START_REPORT" in transaction field under "Default values for" tab.
    7. Check "Skip Initial Screen"
    8. Check "Inherit GUI attributes".
    9. Under Default Values "Name of Screen field"
    a) D_SREPOVARI-REPORTTYPE Value: AQ
    b) D_SREPOVARI-REPORT Value: (Usergroup Name)
    c) D_SREPOVARI-EXTDREPORT Value: (Query Name)
    10. Save.
    Have a look at this thread - [Start Report and Tcode|http://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_forums_rm&query=start_report++%27aq%27&adv=false&sortby=cm_rnd_rankvalue]
    Regards,
    Lokesh

  • How to associate an icon with an application

    Hi folks,
    I have what I think should be an easy question, but I'm at my wit's end trying to solve it. I just used fink to download gimp and it works fine. However, I need to start it from the command line, and I would really like to be able to just click on an icon in the dock. The gimp icon is available, but I don't know how to associate it with the command to launch the gimp. Any tips or suggestions would be warmly received.
    Thanks in advance,
    Carl

    You can't really "associate" an icon with a command/executable in OS X - it has to be provided by an application. Is there a reason why you don't want to use one of the packaged versions of gimp, such as http://gimp-app.sourceforge.net/ ?

  • How to associate an uploaded file with form data

    I have a "ticketing" app which stores a ticket no. as well as allows users to upload multiple files per ticket. The problem I am having is how to associate an uploaded file with a particular ticket no. As you can guess this becomes complicated when the same user can potentially update multiple tickets using the same file names. I am having difficulty trying to understand how to associate a ticket no with one or more uploaded files. I do have a custom table which I update with the attachments but I am unsure how to, or when to, update the ticket information on this custom table. I only want to retrieve attachments for a given ticket, not all attachments uploaded by a user.Does anyone have any ideas?

    Hi,
    My question is bit related to this topic.
    I am having a requirement to upload the CSV files so that they will store in a database table and later on wards when they search on that table it needs to pull the information and display on the form. I am a new bee to application express. Could some body tell me how to start this process with??. Just give me an overvoew/hints so that I will try to carry on my own.
    Cheers,
    Krishna.

Maybe you are looking for

  • Transfer of flat file from Oracle to SAP from ABAP code

    Hi Expert, I have to write a code in ABAP that call the Oracle procedure and it transfer the file generated by Oracle procedure. To call the Oracle procedure from ABAP with passing multiple parameters that i know the syntax but how to transfer the fl

  • Help Stored Procedure

    Hi all, I have these data: ID id_part ord lev 1606 1513852 183 2 1606 1513853 184 3 1606 1513854 185 4 1606 1513855 186 4 1606 1513856 187 3 1606 1513857 188 4 1606 1513862 193 2 1606 1513863 194 3 ID->ID id_part-> ID ord->identirt lev->hierarchy of

  • UI control for time editing in 7.00

    Hi Experts Maybe a stupid question, but.. How do you provide editing capabilities for a Time field. Is there any UI control like DateNavigator for the purpose? I have context attribute of java.sql.Time and user wants to edit the attribute on UI. Any

  • "Track Shipment" is iOS4 does not work for Canada Post tracking numbers

    Not 100% sure this is the best forum to post this but couldn't find an iOS specific forum. When an email arrives with a shipment tracking number embedded in it, iOS4 is smart enough to recognize it and turn it into a link. You click the link, select

  • POP MAIL STOPPED WORKING - server doesn't support X-APOP?

    All of a sudden I am getting an error for my POP mail that says the POP server does not support "X-APOP authentication". I didn't change any settings and I haven't been able to receive any of my POP mail since Sunday. Any ideas?