Trapping list selection click

Greetings!
I am using a JList subclass which produces a checked list box. For various reasons, I only want the list to check/uncheck if they click in the box -- not in the body of the item. I want something else to happen if they click in the text. I do not seem able to get the 'MouseDown' event before the 'SelectionChange' event fires, and since I have code in that handler which relies on the code I had put in the MouseDown handler to work, it's crashing.
In essence, my current code looks like this:
Mousedown
//find the point.
//set a property in the checkboxlist to record the click point
SelectionChanged
//check the point we set in mousedown.
//is it where we want it?
//no? Then skedaddle, don't actually change anything
//yes? OK, do the rest.
This ain't working, and I suspect I'm doing something Very Dim Indeed. I welcome all solutions.

In my experience I've found that trying to do what you are trying to do can be very very difficult.
This is going to sound crazy, but honestly I think what I'd do is reimplement JList - either from scratch or using the source code

Similar Messages

  • Connect the device to your computer. Open iTunes. Select iPhone, iPad, or iPod in the Devices list. Click the Summary tab and select "Manually manage music and videos". Click Apply. but after that say's everything on my iPhone will be deleted

    Connect the device to your computer.
    Open iTunes.
    Select iPhone, iPad, or iPod in the Devices list.
    Click the Summary tab and select "Manually manage music and videos".
    Click Apply.
    than it says it'ss erase my iphone and sync with itunes library.
    what should i do?

    It wil only erase the music and videos. Nothing else.

  • [svn:fx-trunk] 13362: List mouse click selection bug fix

    Revision: 13362
    Revision: 13362
    Author:   [email protected]
    Date:     2010-01-07 17:22:41 -0800 (Thu, 07 Jan 2010)
    Log Message:
    List mouse click selection bug fix
    SDK-24963 - Mouse click is ignored by List if  allowMultipleSelection="true" in some cases
    Updated setSelectedIndices to perform the single index equality check if selectedIndices has only one index.
    QE notes: None
    Doc notes: None
    Bugs: SDK-24963
    Reviewer: Ryan
    Tests run: checkintests, List
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24963
        http://bugs.adobe.com/jira/browse/SDK-24963
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as

  • Query Report - To display additional column in list selection box.

    Hi,
    There is query report where i want to display the additional column in list selection.
    Below is the system query report, where parameter passed is card code.
    When the cardcode - list selection is clicked system displays 2 columns i.e. Customer Code & No. of Records.
    Now in the same list selection; is it possible to display the customer name along with cardcode only for reference.
    SELECT T0.DocDate, T1.SlpName, T2.Name, T0.DocDueDate, T0.DocNum,    (CASE WHEN T0.DocStatus = 'O' THEN 'Open' ELSE 'Closed' END) AS Status,    T0.DocTotal FROM OQUT T0 LEFT JOIN OSLP T1    ON T0.SlpCode = T1.SlpCode LEFT JOIN OCPR T2 ON T0.CntctCode = T2.CntctCode WHERE T0.CardCode = N'[%0]'    ORDER BY T0.DocNum DESC
    Kindly let me know the details.
    Thanks & Regards,
    Yogesh Jadav

    Hi Yogesh Jadav,
    The answer is NO.  You may only display either code or name but not both.
    Thanks,
    Gordon

  • Disable Spark List selection indicator

    How do I get rid of the Spark List selection indicator entirely?  I don't want the rectangular indicator when the mouse hovers over an item, and I don't want the color to change when the mouse is clicked.

    You'll have to extend default item renderer (ItemRenderer for instance) and set autoDrawBackground to false. And then use your item renderer in a list.
    See this document for more information on spark item renderers.

  • Tile List selection after pressing embedded Image button

    Hi;
    I am working on SAP Work Manager 6.0 customizing using Agentry 6.1.3. I have this tile list that contains items. At the bottom of this tile list, I have a button that targets the selected item on the tile list. This button has an action which changes the icon  of the selected item when pressed and also executes an edit transaction that prints/changes the selected item property values based on rules. After selecting a particular item from the tile list and clicking on this button, the selected item's image changes to the image that I want, but the selection highlighter toggles and always moves to the first item on the tile list. I have tried implementing a list selection but it somehow always ignores this and always toggles back to the first item on the tile list. I would like it to stay on the selected item, whose image has just been changed. How would I go about having the selection highlighter stay on the same item before and after pressing the button?
    Your help is greatly appreciated!
    Thanks in advance!
    Sizo Ndlovu

    Hi Jason;
    Thank you for the prompt response.I'm using the .NET client to test on the development machine and the application is deployed onto an Android 4.0.4 device. I have tried implementing this as shown below:
    The action steps:
    The Navigation step:
    The List Selection step:
    The List Selection rule:
    I have also tried implementing this using the navigation only or the list selection only, with no success.
    Thanks and Regards;
    Sizo Ndlovu

  • Saving and restoring list selections

    I've got a list control in a popup window, supplied by a
    dataProvider. The user makes selections, clicks OK, and the
    selections are processed -- it all works fine.
    However, since it's a popup window, when it's closed the
    SELECTION is lost. When the window is opened again, the list has
    nothing selected (as expected).
    My question is, how do I save what items were selected, and
    then show them as selected again when I re-display the list?
    Thanks.

    Thanks.
    What if the data provider is NOT at the root, but in a
    component?
    In my root app, I have an MXML component referenced
    (id="s1"). It's THAT component that's calling the popup and
    contains the dataProvider.
    How does the window refer to the component that called it?
    I'm trying to leave this generic, rather than specific, so I can
    use the same popup component several places in the app.
    There are multiple components (s1, s2, s3 etc) that call this
    window, and I keep the dataProviders in each of these components.
    So the window needs to be able to "find" the _aSelectedItems
    relating to the screen that "celled" it.
    Thanks.

  • HT204088 The directions you provided above doesnt even work!  when I selected "Click to open your account", there is an ERROR message and takes me to no where!  when I try to access my itunes account, it says I have no history?

    The directions you provided above doesnt even work!  when I selected "Click to open your account", there is an ERROR message and takes me to no where!  when I try to access my itunes account, it says I have no history?

    You are not able to view purchase history on your iOS device.  You may only re-download previous purchases from the iOS device.
    To review your iTunes Store account's purchase history, follow the steps in this article from a computer only:
    Seeing your iTunes Store purchase history and order numbers
    http://support.apple.com/kb/HT2727

  • How can I get a drop-down list selection also be selected in another field with the same list but a different name?

    I have a street address and a billing address. A question is posed with a checkbox — "Is the billing address the same as the street address?" If Yes is checked, the street address automatically fills the billing fields. If No is checked, the user must fill in new information. In both the street address and billing addres, the State field is a drop-down list. How can I get the drop-down list selection in the street address State also be selected in drop-down list for the billing address State?

    Has anyone done this?

  • Hello  Simple problem - don,t know how to solve it.  With Premiere CC when I try to do a selection (click... drag... release the click) very often it stop way before the end of the move I'm swinging the Magic Mouse. I taught that the mouse clicking was de

    Hello
    Simple problem - don,t know how to solve it.
    With Premiere CC when I try to do a selection (click... drag... release the click) very often it stop way before the end of the move I'm swinging the Magic Mouse. I taught that the mouse clicking was defective and went to get a new Magic Mouse after lots of frustration. Today, I have an edit to do it it does the SAME thing !!
    I was like ????#$%?&*(???
    Opened all the lights and taught I've trow the new mouse to the garbage and was using the defective mouse again... no !! - ??
    Actually, the bran new mouse is doing the same thing. What I understand after investigating on the motion and watching carefully my fingers !! -  is that when I click I have to keep my finger at the EXACT same place on the mouse... drag and release and it's fine. If I click by pushing on the mouse and my finder is moving of a 1/32th of a millimeter, it will release and my selection will be to redo. You can understand my frustration ! - 75$ later... same problem, but I know that if I click with about 5 pounds of pressure and trying to pass my finger through the plastic of the mouse, it you stay steady and make it !
    The problem is that scrolling is enable while clicking and it bugs.
    How to disable it ??
    Simple question - can't find the answer !

    Helllooo !?
    sorry but the Magic Mouse is just useless with the new Adobe Premiere CC and since I'm not the only one but can't find answer this is really disappointing. This mouse is just fantastic and now I have to swap from a USB mouse to the Magic Mouse every times I do some editing. My USB mouse if hurting my hand somehow and I want to got back to the Magic Mouse asap. Please - for sure there is a simple solution !
    Thanks !!

  • UI - How to make Columns in a Drop Down List Selection?

    I am altering a code from Peter Kahrel "Beginning Script UI". I am trying to make a searchable drop down list that will have 4 columns. So far, the search works and I have headings in the search, but I cannot seem to make the columns for the actual data. I believe I need to change the type_ahead since the array is looking at this data. I'm stuck in the water. Can someone tell me what I need to do to get the list to show up as columns? How do I turn the picked = type_ahead data into four columns? Code and Screenshot below:
    picked = type_ahead (["bat", "bear", "beaver", "bee", "cat", "cats_and_dogs",
    "dog", "maggot", "moose", "moth", "mouse"]);
    function type_ahead (array)
    var w = new Window ("dialog", "Quick select");
    var entry = w.add ("edittext", [0, 0, 800, 22]);
    entry.active = true;
    var list = w.add ("listbox",  [0, 0,800, 500], "",
    {numberOfColumns: 4, showHeaders: true,
    columnTitles: ["Non-Approved Word", "Approved Alternative", "Approved Use", "Non-Approved Use"], columnWidths: [200,200,200,200]});
    list.selection = 0;
    entry.onChanging = function ()
    var temp = this.text;
    list.removeAll ();
    for (var i = 0; i < array.length; i++)
    if (array[i].toLowerCase().indexOf (temp) == 0)
    list.add ("item", array[i]);
    if (list.items.length > 0)
    list.selection = 0;
    entry.onChange = function () {w.close (1)}
    if (w.show () != 2)
    return list.selection.text;
    else
    w.close ();

    Hi Peter,
    This is one of those developments that push the limits of my knowledge-base and when things do that, I lose sleep until I figure it out. With that said :-) here is where I have ended up.
    Basically I made a new array for the table data.  I then use an array lookup to sort the array in the listbox based on the 0 array item. See the code below. Once it is loaded type in "b" and the list will start to sort.
    I need to try to get this to work as a pallete instead of a dialog box. Do palletes support this type of functionality?
    var newarray = new Array(
    new Array('Butterfly ','has wings','can fly'),
    new Array('bohemith moth','has wings','cannot fly very good'),
    new Array('word 3','replacement word','use case'));
    picked = type_ahead (newarray);
    function type_ahead (array)
    var w = new Window ("dialog", "STE Checker");
    var entry = w.add ("edittext", [0, 0, 800, 22]);
    entry.active = true;
    var list = w.add ("listbox",  [0, 0,800, 500], "",
    {numberOfColumns: 3, showHeaders: true,
    columnTitles: ["Column 1",  "Column 2", "Column 3" ], columnWidths: [200,200,400]});
    list.selection = 0;
    entry.onChanging = function ()
    var temp = this.text;
    list.removeAll ();
    for (var i = 0; i < array.length; i++)
    if (array[i][0].toLowerCase().indexOf (temp) == 0)
    with (list.add ("item", array[i][0]))
    subItems[0].text = array[i][1];
    subItems[1].text = array[i][2];
    if (list.items.length > 0)
    list.selection = 0;
    entry.onChange = function () {}
    if (w.show () != 2)
    return list.selection.text;
    else
    w.close ();

  • List selection bean

    Does anyone know where I could grab a "list selection bean" of some sort...I'm thinking the kind of widget that shows two lists. The list on the left is all available options while the list on the right can have 0 to n entries. The user selects items from the left list and puts them in the right, or removes items from the right list putting them back in the left list by pushing buttons with right/left facing arrows (or whatever) located in the center of the dialog between the two lists. Buttons on the bottom include the typical "OK", "Cancel". I'm writing some displays that require this sort of dialog to gather info from a user and am hoping I don't have to re-write the bean as I imagine several people have already accomplished this!
    Thanks!
    Dove

    It is actually not too hard to write. Create a JPanel with a TableLayout or a BorderLayout. Insert a JScrollPane each with a JList on the left and right. Grab both JList model's so you can insert/remove directly to the model. Now, in the event handler of --> you do something like:
    Object o[] = leftList.getSelectedValues();
    for (int cntr = 0; cntr < o.length; cntr++)
    rightListModel.addElement(o[cntr]);
    leftListModel.removeElement(o[cntr]);
    This would get any selected items on the left, move them to the right and remove them from the left. You would probably have to add:
    rightList.updateUI();
    leftList.updateUI();
    just to be sure both repain themselves.
    I believe that is all I used. Works great. Then, when you are ready, you get the selectedValues() from the rightList object and you are set to do what you need. Moving one or many is the same code, and the reverse is done just as easily. Removing all from either side is just as easy as well.

  • Alert is not working for mutiple times for list "select" function in sapui5 XML view

    Hello All,
    I am trying to open an alert for multiple times for list "select" function. But it's opening for only one time .
    Please find code below.
    View Part
    <List id="contactedit" select="somefunction">
        <CustomListItem id="custom1" type="Inactive" >
    <content>
    <Label text="this is label" />
    </content>
    </CustomListItem>
    </List>
    Controller Part
    somefunction: function(oEvent){
    alert("this is an alert");
    Thanks in Advance
    D.Mohanbabu

    I think I saw this question in stack overflow. And I answered it :-)
    I believe that it is because you can only one item in the list and once the item is selected, re-selecting it will not fire the event.
    Try adding more items to the list and select different items.
    Thanks
    -D

  • Master detail where master is a list select menu

    I'd like to create something similar to this example http://labs.adobe.com/technologies/spry/samples/data_region/SprySetRowSample.html but instead of a static menu on the left I'd like it to be a list select menu. Is this possible? Thanks.

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <script src="SpryAssets/xpath.js"></script>
    <script src="SpryAssets/SpryData.js"></script>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet">
    <script>
    var ds1 = new Spry.Data.XMLDataSet("employees.xml", "employees/employee");
    function selectDetail(row) {
        ds1.setCurrentRow(row);
    </script>
    </head>
    <body>
    <div class="MasterDetail">
      <div spry:region="ds1" class="MasterContainer">
          <select onChange="selectDetail(this.value)">
            <option spry:repeat="ds1" value="{ds_RowID}">{lastname}</option>
            </select>
      </div>
      <div spry:detailregion="ds1" class="DetailContainer">
        <div class="DetailColumn">{firstname}</div>
        <div class="DetailColumn">{lastname}</div>
        <div class="DetailColumn">{phone}</div>
        <div class="DetailColumn">{username}</div>
      </div>
      <br style="clear:both" />
    </div>
    </body>
    </html>
    Gramps

  • Could not see object list selection in SE80

    'Hi,
       I have IDES connection through my company VPN.I could not see object list selection in se80 ,instead I see blank white box in that place.I could not even see F1 help,all I see is blank page.Could any of you help me to sort out this problem.This is system specific as other computers do not have this problem.
    Regds
    Surendranath

    Hi,
    You have to install the Latest SAP GUI patch in your deskstop/system. Then it will be displayed.
    Regards,
    Chaitanya

Maybe you are looking for

  • ISO 7 current download - I Pad in recovery mode.

    Hi, I have just downloaded the latest version of ISO and now my I Pad2 is not working. The home screen displays an image of the I Tunes logo with a diagram requesting that i log on to I tunes. When I connected the IPad to ITunes the following happene

  • Lost sound on my macbook pro?

    ... sound was working fine now sound is 'stuck on mute'  and also  'internal speakers' has disappeared? can anyone help?

  • Looping recorded data (project specific)

    Hi everyone, I've recently got logic studio and absolutely loving it - it's great. I've got this project that I started quite recently and whenever I record in it (be it audio or MIDI) as soon as you hit the space bar to stop recording your region ge

  • Ready to give up on Blackberry DM

    I have followed every instruction I could find to uninstall my 5.0 DM. Nothing works. My OS is a 64bit Vista Home Edition. The error is "1402 could no open key" I have tried everything I can think of , I'm out of ideas Please someone help !!!!

  • Archive and Install--I don't understand it!

    I'm a long time Mac user, but I have never done an A&I. I have to do one now according to the Apple support guys. My questions: Will I have to reinstall all my non-Apple applications? Will I lose any files? I've been reading old threads, but I still