ListBox/Xcontrol with mouse click but no dragging

Bonjour,
Je suis actuellement en train de paufiner mon IHM et j'aimerais résoudre un petit problème concernant ma listbox. Cette listbox est contenue dans un Xcontrol mais c'est un détail.
Ce que j'aimerais effectuer c'est de pouvoir selectionner les élements de ma listbox avec la souris mais ne pas permettre de dérouller la scrollbar lorsque je glisse ma souris vers le bas ou vers le haut.
Est ce que je peux faire celà avec un noeud de propriété (solution facilitée) ou bien suis je obligé de coder la fonctionnalité ?
Si vous voulez un petit exemple, voilà ci dessous ce que je peux vous proposer.
Oops, it's in the wrong community forum.
So, I can try to explain that in english.
Hello,
I'm trying to create a listbox where I can select my item by clicking on it but I don't want to select an item, dragging down et seeing my scrollbar going down. 
Is there a property node to do that or am I obbliged to developp this fonctionnality ?
Thank you.
Note : I don't want to disable it because I'll not be able to select an item by clicking on it.
Attachments:
Exemple defillement.vi ‏9 KB

Sorry just got home from very long drive and tired . My question doesn't make sense. Restarted computer upon returning home . Prior to leaving house did lose power due to ice storm and wonder if that did something.
Anyway, it's not the mouse that's not working it's the wireless keyboard. I can't get into my computer because I cannot even type my password. No icons are available to me to click on to open computer or check computer. No apple icon for example. Only thing is top right of screen showing WiFi on full bars and the time. The little green light in wireless keyboard flashes intermittently. I have tried shutting down computer, unplugging etc. Nothing is working. Really need computer tomorrow. Time sensitive work to do. Thinking I might have to take a trip to the Apple store in morning?
Using my phone right now to type this.

Similar Messages

  • Problems with mouse clicks..

    Hello.
    i�m having problems with the mouse clicks in a component...
    i have events that occur when a click is given and others when 2 clicks are given, but these events occurs only once a while....it�s not always that they occur...
    can anyone help me with it?? it�s very strange...
    thanx

    How about copy and pasting your mouseClicked or mousePressed methods. Are you sure you know the difference between a click and a press?

  • Firefox 9.0.1 with Flash player not catch keyboard event with mouse click.

    In a flash application, I need select mutil items using shite key and mouse click, it is not working. looks like firefox didn't pass the keyboard even alone with the click event. This happen on Window 7, IE and Chrome have no problem. only FF

    i have the same problem everytime i open a website with flashcontent firefox freezes and i have to kill the flash process to unfreeze the browser the only way i can see a youtube video is in html5 mode.
    Hardware
    Acer aspire 4553
    Turion X2 p520
    3gb of ddr3 ram
    Ati Mobility Radeon 4250

  • Issues with mouse clicks/jumps after using CleanMyMac App.

    Since using this app. my hitherto slightly slow responding iMac has required multiple mouse clicks and is less/unresponsive.
    Anyone else used this software?
    As yet have not approached CleanMy Mac.
    I have reinstalled Mountain Lion (download) not clean install.
    Any suggestions? Is there a separate app for mouse that I can reload. Im guessing a minor chunk of code was deleted along with rubbish.
    Reg25x

    Uninstall CleanMyMac and do not reinstall it.
    CleanMyMac is one of a broad category of time- and money-wasters capable of causing system corruption that can only be rectified by reinstalling OS X, restoring from a backup, or completely erasing your system and rebuilding it from the ground up. Get rid of it and test your Mac for operation. If it does not perform normally, the possibility that Cleanmymac resulted in system corruption must be considered.
    The vast majority of Mac problems reported on this site are the direct result of having used garbage like that. Never install such junk on a Mac.

  • Character movement with mouse click

    This will be for an MMO online game/ world. So it needs to be good.
    Hi guys. I'm really happy I got this to work as I'm a neebie to AS3 but getting to love its simplicity. My problem is not my AS3 but my maths.
    I click the mouse and the movieclip runs to the mouse's x position. However, it only goes in one direction ie: downwards and to the right.
    I need to it go in all directions depending on where I click. I suppose it has to do with comparing x and y positions of both mouse and mc - ie: if one is bigger than the other then you can tell where both are positioned and then put the code in. Am I right and does anybody hace a little code like this flying around for me?
    import flash.display.Stage;
    import flash.events.Event;
    stage.addEventListener(MouseEvent.CLICK, myClickReaction);
    function myClickReaction (e:MouseEvent):void{
        sunny.gotoAndPlay("runback")
        //sunny.x = root.stage.mouseX
        //sunny.y = root.stage.mouseY
        addEventListener(Event.ENTER_FRAME, onEnterFrame);
    function onEnterFrame(event:Event):void {
                 var xDistance:Number
                 var yDistance:Number
                //mc increments by 5 until it reaches mouse - mc (ie the distance)
                sunny.x += 5;
                sunny.y += 5;
                xDistance = root.stage.mouseX - sunny.x
                trace (xDistance)
                if (xDistance <= 0 ) {
                trace("works")
                sunny.gotoAndPlay("static")
                removeEventListener(Event.ENTER_FRAME, onEnterFrame);

    Thanks for contacting but the code more or less works already apart from the comments below.
    The position I get comparing mousex position and movieclip position. BUT it goes loopy when I move the mouse around. ie: I need the coordinates when I click and not a variable that changes while I move mouse around.
    I will check it out now.
    import flash.display.Stage;
    import flash.events.Event;
    stage.addEventListener(MouseEvent.CLICK, myClickReaction);
    function myClickReaction (e:MouseEvent):void{
    //sunny.x = root.stage.mouseX
    //sunny.y = root.stage.mouseY
    addEventListener(Event.ENTER_FRAME, onEnterFrame);
    function onEnterFrame(event:Event):void {
                 var xDistance:Number
        var yDistance:Number
       //mc increments by 5 until it reaches mouse - mc (ie the distance)
                // if you click to the right of sunny then mouse is > than sunny.x so x = 5
       if (root.stage.mouseX > sunny.x) {
        sunny.gotoAndPlay("walk right")
        sunny.x += 5;
        sunny.y += 0;
        xDistance = root.stage.mouseX - sunny.x
        //if (xDistance <= 0 ) {
        //sunny.gotoAndPlay("static")
        //removeEventListener(Event.ENTER_FRAME, onEnterFrame);

  • Trouble with mouse click

    I used to have a LOGITECH but reverted to the wired APPLE mouse that came with my computer. My problem is when I try to click on a file ONCE to : let's say change a file name or edit a file ...it'll open a file in a program I didn't command it to. A good example are sound files I'll try to edit an audio file name but the single click causes QUICKTIME to open the file and play it...very annoying when you are try to navigate your files. Thanks

    yes but the problem exists even going back to the old mouse with wire. I need to reiterate that the problem didn';t exist in early summer when I was using the LOGITECH mouse only sometime during June I began to notice the trouble and it's there with the (wireless) LOGITECH and/or APPLE mouse (wired USB). Mystery unsolved. Thanks for responding.

  • Desktop files won't open with mouse click

    I'm sure this has an obvious solution, but I can't find it.
    (I'm on a new Powerbook G4 running Tiger)
    When I try to open a folder or file on my desktop by double clicking it, nothing happens.
    However, when I click once on the folder/icon to highlight it, then hit Command + O, it opens/launches.
    I want to be able to open files with my touchpad without having to use the keys. Is there a setting for this?
    Thanks!!!!
    Powerbook G4 15"   Mac OS X (10.4.1)  

    You might want to go into the System Preferences under "Keyboard & Mouse" and check your double-click settings. Also, if I understand correctly, to click using the trackpad itself, you can select "Clicking" under the trackpad options.
    PowerBook G4 12 1.5GHz and a bag full of goodies!   Mac OS X (10.4.4)   80GB HD, 512 MB ram, 300GB Maxtor OneTouch II FireWire 400 External HD.

  • Bug: scrolling with mouse scroll wheel while dragging tracks no longer works

    After upgrading to Spotify for Mac 1.0.2.6, I can no longer use my mouse's scroll wheel while dragging tracks to a different position in a playlist. This is an important feature when working with long playlists. Steps to reproduce:Create a playlist that extends past the bottom of the windowClick and begin dragging the first song on the playlist downwardUse your mouse's scroll wheel to scroll the playlist down. It will not scroll.

    Hey ,
    Thanks for letting us know.
    We don't have any update on this yet and we'll pass the information on to the right team.
    We'll keep you posted.
    Thanks! 

  • How to highlight Icon with mouse click ?

    This program will open up a JFileChooser, Select one or more than one images from your computer. It will display them as Icons.
    I am trying to highlight any icon with mouseclick from the program below but I am not able to do it. Please help. Thanks in advance.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.RenderingHints;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import javax.swing.*;
    import javax.swing.border.Border;
    public class IconIllustrate extends JFrame implements ActionListener, MouseListener
    JLabel[] lblimage = new JLabel[10];
    JPanel panAttachment = new JPanel();
    JPanel panButton = new JPanel();
    JButton bAdd = new JButton("Add");
    Component comp = null;
    Component c = null;
    boolean bolVal = false;
    public IconIllustrate()
    // TODO Auto-generated constructor stub
    panButton.add(bAdd);
    bAdd.addActionListener(this);
    this.getContentPane().setLayout(new BorderLayout());
    this.getContentPane().add(panAttachment, BorderLayout.CENTER);
    this.getContentPane().add(panButton, BorderLayout.SOUTH);
    * @param args
    public static void main(String[] s)
    // TODO Auto-generated method stub
    IconIllustrate ii = new IconIllustrate();
    ii.setLocation(300, 200);
    ii.setTitle("Testing Highlight Icon");
    ii.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    ii.setSize(400, 300);
    ii.setVisible(true);
    public void actionPerformed(ActionEvent ae)
    // TODO Auto-generated method stub
    if(ae.getSource().equals(bAdd))
    JFileChooser chooser = new JFileChooser();
    chooser.setMultiSelectionEnabled(true);
    int answer = chooser.showOpenDialog(this);
    File[] file = null;
    String[] fileName = new String[10];
    if(answer == JFileChooser.OPEN_DIALOG)
    file = chooser.getSelectedFiles();
    ImageIcon icon;
    try
    for(int i = 0; i < file.length; i++)
    icon = new ImageIcon(file.toString());
    ImageIcon thumbnailIcon = new ImageIcon(getScaledImage(icon.getImage(), 50, 40));
    lblimage = new JLabel[10];
    lblimage[i] = new JLabel();
    lblimage[i].addMouseListener(this);
    lblimage[i].setName("" + i);
    lblimage[i].setBorder(BorderFactory.createEmptyBorder());
    lblimage[i].setVerticalTextPosition(JLabel.BOTTOM);
    lblimage[i].setHorizontalTextPosition(JLabel.CENTER);
    lblimage[i].setHorizontalAlignment(JLabel.CENTER);
    lblimage[i].setIcon(thumbnailIcon);
    panAttachment.add(lblimage[i]);
    panAttachment.revalidate();
    catch(Exception ex )
    ex.printStackTrace();
    private Image getScaledImage(Image srcImg, int w, int h)
    BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = resizedImg.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
    RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    g2.drawImage(srcImg, 0, 0, w, h, null);
    g2.dispose();
    return resizedImg;
    public void mouseClicked(MouseEvent me)
    // TODO Auto-generated method stub
    int clickCount = me.getClickCount();
    if(clickCount == 1 || clickCount == 2)
    Component comp = me.getComponent();
    Component c = comp.getComponentAt(me.getX(), me.getY());
    // c.setPreferredSize(new Dimension(100, 100));
    c.setBackground(Color.CYAN);
    System.out.println("clickCount");
    repaint();
    this.panAttachment.revalidate();
    public void mouseEntered(MouseEvent arg0)
    // TODO Auto-generated method stub
    public void mouseExited(MouseEvent arg0)
    // TODO Auto-generated method stub
    public void mousePressed(MouseEvent arg0)
    // TODO Auto-generated method stub
    public void mouseReleased(MouseEvent arg0)
    // TODO Auto-generated method stub

    Hi,
    phungho2000 wrote:
    Thank you for the Code. Now I am able to set the label border. I need to figure out how keep track of the last selected component so that I can reset the border.**g**
    No, you have still fundamental misunderstood how listeners are working. You add a listener to a component. From this time on, this listener is watching this component. It listens if something occurs with this component therefor it is competent. If so, then it will pay attention to this. So the listener always knows the components it is in charge of. There is no need for you to "keep track of the last selected component" because the listener is doing this for you already.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.GridLayout;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.FocusEvent;
    import java.awt.event.FocusListener;
    import javax.swing.*;
    public class FocusTesting extends JFrame implements FocusListener, MouseListener
      // There is no need for JLabel fields here.
      //JLabel labelA = new JLabel("Label A");
      //JLabel labelB = new JLabel("Label B");
      public FocusTesting()
        super("FocusTesting");
        JPanel paneFirst = new JPanel();
        JPanel paneSecond = new JPanel();
        paneSecond.setBackground(Color.gray);
        //use simply FlowLayout for testing this
        //paneFirst.setLayout(new BorderLayout());
        paneFirst.setBorder(BorderFactory.createBevelBorder(2));
        // pane.setBackground(Color.blue);
        JLabel labelA = new JLabel("Label A");
        // give the labelA a name only to show you, that the listener knows about the compontent it ist added to
        labelA.setName(labelA.getText());
        labelA.addMouseListener(this);
        labelA.addFocusListener(this);
        labelA.setFocusable(true);
        JLabel labelB = new JLabel("Label B");
        // give the labelB a name only to show you, that the listener knows about the compontent it ist added to
        labelB.setName(labelB.getText());
        labelB.addMouseListener(this);
        labelB.addFocusListener(this);
        labelB.setFocusable(true);
        paneFirst.add(labelA);
        paneFirst.add(labelB);
        this.getContentPane().setLayout(new GridLayout(2, 1));
        this.getContentPane().add(paneFirst);
        this.getContentPane().add(paneSecond);
      public static void main(String[] s)
        //separate the initial thread form the event dispatch thread
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            FocusTesting ft = new FocusTesting();
            ft.setLocation(300, 200);
            ft.setSize(300, 200);
            ft.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            ft.setVisible(true);
      public void focusGained(FocusEvent fe)
        // TODO Auto-generated method stub
        JComponent jcomp = (JComponent)fe.getComponent();
        jcomp.setBorder(BorderFactory.createLineBorder(Color.GREEN, 5));
        System.out.println("focusGained " + jcomp.getName());
      public void focusLost(FocusEvent fe) 
        // TODO Auto-generated method stub
        JComponent jcomp = (JComponent)fe.getComponent();
        jcomp.setBorder(BorderFactory.createEmptyBorder());
        System.out.println("focusLost " + jcomp.getName());
      public void mouseClicked(MouseEvent me)
        Component comp = me.getComponent();
        comp.requestFocusInWindow();
        System.out.println("mouseClicked " + comp.getName());
      public void mouseEntered(MouseEvent arg0)
        // TODO Auto-generated method stub
      public void mouseExited(MouseEvent arg0)
        // TODO Auto-generated method stub
      public void mousePressed(MouseEvent arg0)
        // TODO Auto-generated method stub
      public void mouseReleased(MouseEvent arg0)
        // TODO Auto-generated method stub
    } You also should read again the Java Tutorial about Concurrency in Swing. Especially why and how to separate the initial thread form the event dispatch thread. [http://java.sun.com/docs/books/tutorial/uiswing/concurrency/initial.html]
    Also have a look on [http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html], especially [http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html#focusable] for why use the MouseListener too.
    And if you have understood that all, then you may think about in what way it would be much easier to use JButton's instead of JLabel's for your clickable and focusable thumbnails.
    best regards
    Axel

  • Change state with timer as well as with mouse click?

    I would like to set up an image with two states, "State 1" and "State 2"
    I would like the button to toggle between "State 1" and "State 2" onMouseDown.
    But I would also like the button to alternate between "State 1" and "State 2" on its own every 3 seconds.
    Can you tell me how to set this up?

    This should get you started:
    http://www.playingwithfire.com/fun.html

  • Set default value with mouse click?

    Hi guys,
    I'm new enough to LabVIEW, and indeed this forum, so I hope you can help. I'm guessing it's a simple problem, but I can't figure out how to do it.
    I've got a cRIO taking in 4 analog voltages. Each voltage is from a linear potentiometer which is measuring suspension displacment on a Formula Student race car.
    I have a simple formula set up to convert input voltage to displacment. I've set up a table of inputs which allows me to set maximum, minimum,(from previous sensor calibration) and "stationary" value of each sensor.
    The "stationary" value is what the sensor should be reading when the car is stopped. This is then used as a baseline for either positive or negative displacments.
    My problem is that each time a different driver gets in the car, the susspension is adjusted, or fuel is added, the "stationary" value will be different. I then have to manually set the stationary value back to whatever the current value is when the car is stopped, press "make current value default", and save the VI before continuing.
    What I would like, is a "calibrate" button which I can press that sets the "stationary" value to whatever the current input voltage is. This way, I wouldn't have to reset 4 values each time the car is modified.
    If you have any ideas on how to do this, please let me know.
    I'll attach my VI once I get back to the laptop where it is saved!
    Thanks,
    Kevin Irving
    Solved!
    Go to Solution.

    Kevin,
    As you have discovered you cannot change the default values on a running VI.
    The best way to do what you want is to use a configuration file.  There is a set of VIs specifically designed for that purpose on the File I/O palette.  When the user presses the "calibrate" button, the values are saved to the file. When the program starts it reads the file and sets the controls to the values in the file.  You can even keep different sets for each driver, if the data is consistent enough.
    Read the detailed help files for the configuration VIs and look at the examples.  These will show you how to get started.
    Lynn

  • Change color with mouse click

    I have a textfield that has a red background color. How do i make it white by just clicking the textfield?

    See
    Component.setBackground
    MouseListener / MouseAdapter
    java.awt.Color

  • Looking up the values in a waveform graph with a mouse click

    Hi,
    Does anyone know how to look up the values in a waveform graph with a mouse
    click but... without the cursor legend on, if i press in the waveform graph
    nothing happens, i must search my cursors and only then i can see the values
    of my signal data?! Isn't there any other way?
    Best regards,
    Thijs Boerée

    Dear Chad,
    I know of the function "bring cursor to center". I also figured out that
    when i use a property node of the cursor array of clusters, that i can see
    that some values change when i move the cursor (i can see the X and Y scale
    value change of the graph and also the values of the mouse pointer (in
    points due to screen resolution)) But in this cluster i can't set the mouse
    position. I allready made a VI where i can see the bounds of my
    waveformgraph and I have the Xscale (min and max) and the Yscale (min and
    max), with a linear fit i can translate my mouse position to X an Y scale
    values and when i click on my waveform graph the cursor go's to that
    position (property node of the cursor position), only disadvantage is that i
    only have the bounds of my plot area and not the position, i do have the
    position of my waveform graph but the plot area isn't allways in the center,
    if i could extract the position of the plot area i may find a solution to
    solve this problem.
    And to file a product question:
    I would like to see the function that with a mouse click a little menu
    appears and that there are options to for example set a marker on that data
    and when you right click on it, that there are options to remove it or to
    add comment, a 2D array could make a list of the different channels with
    it's markers (time stamps and comments).
    Best regards,
    And thank you for your help.
    Thijs Boer�e
    "Chad AE" schreef in bericht
    news:[email protected]...
    > Dear Thijs,
    >
    > Thank you for contacting National Instruments.
    >
    > To address your question, there is no direct VI, command, or property
    > node that will allow the cursor snap-to-mouse functionality.
    >
    > I notice a problem you may be occuring is trying to find where the
    > cursor is on the graph. If this is an issue, you can select Bring to
    > Center from the Formatting Ring on the Cursor Legend to move the
    > cursor to the center of the graph.
    >
    > Let me know if you have any further questions or if this does not
    > resolve your issue, as I would be happy to file a product suggestion
    > so that LabVIEW is improved in future versions.
    >
    > Thanks again and have a great day!
    >
    > Chad AE
    > Applications Engineer - National Instruments

  • Mouse failing to open folders and files with double click.

    Mouse suddenly decided not to open anything with double click. It will highlight with single click but will not open files. Could I have a broken mouse? Could a virus be causing this? I have checked the mouse settings under System preferences and made sure my pc-using children have not set the mouse to second-click status. Any ideas?

    Check back in system preferences > mouse > Double-click speed.  Move the slider to the slower end of the scale.
    Regards

  • Recording a series of mouse clicks possible with Flash?

    Hi,
    I am having a go at developing a drum machine and I have a collection of buttons that play audio.
    Is there a piece of code, or somewhere I can search to record a series of mouse clicks, ideally against a timer that I could then play back?
    I have no idea if this is possible (I am sure it is) or what to search for.

    you can record mouse clicks but timing in flash is approximate so may not be suitable for what you want.
    you can use getTimer() to record the number of ms that have transpired since your app started.  and you can use mouse click listeners to record when the mouse is clicked.

Maybe you are looking for

  • How to set-up  Time Machine after Restore

    After having restored an entire system back from Time Machine, it looks to me as Time Machines wants to completely backup all data already held on the hard-disk. With this effect, the harddisk is not big enough. I do not want to buy another disk. Is

  • Need to Reinstall 10.1, Sometimes More than Once

    In our school environment, we are having to reinstall 10.1 frequently.  Yesterday, we had one instance of IE8 playing a Flash video and a second instance telling us Flash player was not installed.  In all cases, when we go to reinstall 10.1, the Adob

  • Acrobat 9: IAC window problem when opening a pdf

    Hello, I got a C# program , which can iterate over a number of pdf files in a directory. I used the following code for the first document: CAcroApp AcrobatApp = new AcroAppClass(); AVDoc = new AcroAVDocClass(); AVDoc.Open(filename1,""); AcrobatApp.Sh

  • Regarding Monitoring Service for Solution manager

    We need to configure "Monitoring" services in SAP solution manager 7.0. Could somebody suggest us what are the main tasks we need to consider for doing Monitoring settings. How many Minimum servers required to configure Monitoring services in solutio

  • Write data to PLC

    i would like some help in writing characters/integers to a PLC. Allen Bradley SLC-500.