No ctrl deselect list

Hi,
Can anyone tell me how to stop ctrl-click from deselecting the currently selected list item in a JList?
In my list, I want one item to always be selected. I have set the SINGLE_SELECTION model but at the moment, it is still possible to go back to the 'no item selected' state and I dont want this.
Any ideas?
Thanks,
Jim

it's the responsibility of the ListSelectionModel - you could subclass DefaultListSelectionModel to take care of having always at least one selected index.
Cheers
Jeanette

Similar Messages

  • Newbie: swap fn and ctrl keys on T60

    I bought a used T60.  I am used to using HP Pavilions where the Fn and Ctrl keys are in the opposite positions as on the T60, and I am having trouble retriaining my fingers.
    So i looked for info about how to swap them.  I understand KeyTweak doesn't work on the Fn key, and then I ran across a message about getting to the BIOS.
    I have never messed with BIOS stuff before, but I did interrupt booting, get to it, but do not see swapping the Fn and Ctrl keys listed among the keyboard options.  So I am guessing this feature is maybe in a newer verison of the BIOS.
    I don't want to trash my laptop, but I'd like to swap the functioning of these keys - is there an idiotproof way?
    Also, I used the onetouch Pavilion keys a lot to invoke Firefox or thunderbird.  Is there a way to make a key on the T60 keyboard do that?  There are several keys I never use for anything, like PgUp, etc.
    Thanks.

    Not exactly true. You can't swap the keys with ORIGINAL BIOS - there are modded versions available that will let you do it.
    Read (and download) from here: http://forum.notebookreview.com/lenovo-ibm/474396-​fn-ctrl-swap-all-lenovo-laptops-solved.html
    Note! This is unofficial BIOS images - you might brick your computer, and neither I, nor Lenovo take any responsibility
    IT-technician, running my own company in Bergen, Norway
    Thinkpad T61, 8895CTO C2D 2Ghz/4GB/120GB SSD/1400x1050

  • JList : How to force a ListSelectionEvent programmatically

    Hi,
    I have a List, containing one Item, that is selected.
    Now the Content changed, and the new List-Content has two Items.
    I fire a super.fireContentsChanged(this,0,cache.size()-1);
    The List is updated.
    But additionally i want to force a ListSelection-Event
    (because the Item under the selection has changed, an i want to load a few Values to an Editor...)
    liste.setSelectedIndex(-1); // deselect
    liste.setSelectedIndex(0); // select
    has no effect.
    also
    liste.setSelectedValue(model.getRecordset(0),true);
    Any idea ???

    Have you tried calling liste.clearSelection() and then liste.setSelectedIndex()?

  • Flash movie in PowerPoint doesn't play

    I have an SWF file in a PowerPoint 2003 presentation, on
    Vista. When I open it, I get a message "Some controls in this
    presentation can't be activated; they may not be registered on this
    computer." I don't get this when I open the same presentation on
    another computer (using XP).
    When I select the movie, right-click and choose Properties,
    the Properties sheet is blank! (I've never seen this before.) I'm
    sure that this movie worked before on this machine, but can't
    figure out what may have changed to cause this. I had an expired
    Flash CS3 beta (I'm the co-author of Flash for Dummies), but I
    uninstalled it. However, it's still on my Ctrl Panel>Programs
    & Features list.
    When double-clicking an SWF in Win Explorer, Windows asked
    what program to use, even tho' I had Player 9 installed. I
    re-downloaded and installed 9 and told Win to use the player and
    then I could play the SWF from Win Explorer, but that didn't help
    the same SWF when in PowerPoint.
    I wanted to uninstall 9 and install 8 but haven't been able
    to uninstall 9. I tried Ctrl Panel and downloaded the uninstaller
    and tried that. It's off my Ctrl Panel list, but still opens when I
    double-click an SWF. I downloaded Player 8 and tried to install but
    it failed; said I don't have the appropriate privileges.
    I need the SWF to play in PowerPoint; doing a presentation on
    Monday!
    Thanks,
    Ellen Finkelstein

    For HTML5 output you need to replace Flash animations by HMTL animations.

  • Intermittently, when I have selected multiple Inbox messages, I can no longer move any messages around. Restarting fixes it.

    OS: ROSA Desktop Fresh R3 release 2012.1 for x86_64
    TB version: mozilla-thunderbird-24.4.0-69-mib2012.1.x86_64 dom 30 mar 2014 21:33:46 CEST
    Since when: I am pretty sure only this version does it.
    Description: Sometimes it happens that I select the last 3 or 4 Inbox messages to move them, but the operation elicits no further reaction from TB other than highlighting the selection. No other message movement works, even in other tabs. Even if I Ctrl-deselect all selections. Everything else seems to work: I receive, read, send messages. I have used it for hours even. Restarting fixes it.
    NOTE: Once it happened that I selected the last 5 messages to be moved. Then I waited before completing the operation with rightclick. Then I received a new message. The message DID NOT show up below the selection. Then I rightclicked the selection and moved. The move dragged along the new message as well!! I was lucky to have suspected receiving the new message otherwise I would have never found it in the wrong folder! I have been afraid of multi selections including the last received message ever since.

    OS: ROSA Desktop Fresh R3 release 2012.1 for x86_64
    TB version: mozilla-thunderbird-24.4.0-69-mib2012.1.x86_64 dom 30 mar 2014 21:33:46 CEST
    Since when: I am pretty sure only this version does it.
    Description: Sometimes it happens that I select the last 3 or 4 Inbox messages to move them, but the operation elicits no further reaction from TB other than highlighting the selection. No other message movement works, even in other tabs. Even if I Ctrl-deselect all selections. Everything else seems to work: I receive, read, send messages. I have used it for hours even. Restarting fixes it.
    NOTE: Once it happened that I selected the last 5 messages to be moved. Then I waited before completing the operation with rightclick. Then I received a new message. The message DID NOT show up below the selection. Then I rightclicked the selection and moved. The move dragged along the new message as well!! I was lucky to have suspected receiving the new message otherwise I would have never found it in the wrong folder! I have been afraid of multi selections including the last received message ever since.

  • Subscription include License?

    Sales team sold a TA-3Y, but I only see the CTRL license listed in the spec. Does purchasing the subscription include the license for TA? Also how do you redeem the subscription? I can't seem to get a PAK key from eDelivery, only a SEULA.

    Hi Richard,
    The CTRL license is used to convert a regular firewall into a Firepower Capable firewall.
    This license is a $0 cost item.
    ASA5525-CTRL-LIC=
    You will also need to add an SSD to make it into a firepower.
    ASA5500X-SSD120=
    along with a Smartnet for the SSD.
    That covers the hardware.
    For the Firepower subscription. 
    The part numbers should be
    L-ASA5525-TA=       which has a $0 value
    and under it.
    L-ASA5525-TA-3Y   which is the actual 3 year  TA subscription.
    Depending on the firewall model there are some promos like TA-PR you can ask about.
     

  • Ctrl-click deselects item in JList

    I have JList with ListSelectionModel.SINGLE_SELECTION
    and I need exactly one item to be ALWAYS selected.
    But when I make ctrl+click on already selected item then
    this item is deselected and isSelectionEmpty() returns true.
    Does anybody knows how to disable this feature?

    One would think the question would be better asked in the Swing section.
    Why don't you use a JComboBox, because it's exactly made for taking a single selection from a list of items.

  • Deselect all TC VF04 Billing Due List

    Is there a way to have the screen come up with Billings document deselected instead of
    selected?  We have been on SAP since 2.0 and from my knowledge we have always
    had it to be all selected when this screen is opened.  They are suppose to deselect BUT
    sometimes they accidently click on SAVE and everything is billed.  This is not what we want
    but I can not find where to make items not highlighted.
    Thanks

    Hi,
    If you want to exclude some sales documents when running the Billing due list, you can give the field value as "Not equal to" and give the selection criteria.
    Then for that selection of sales documents, billing documents wont be created.

  • Help implementing mouse multi record select deselect with shift/ctrl click

    Forms 10.1.2.3 on Solaris Sparc 64 bit
    We are trying to implement mouse multi record select/deselect using shift and ctrl click. I have read that you need the appcore library to do this but because we aren't using Oracle Applications (EBS) we can't have the appcore library.
    Has anyone implemented this function without the appcore library?
    Thanks

    Why not just use a CheckBox to indicate the selected records? The downfall to almost all methods is that you end up looping through the block to see which records are selected. An alternative to this is to use a record group to record which the selected records. I created a nice little wrapper package to work with Record Groups (RG). Take a look at Forms - Record Group Processing (Duplicate Value Checking). As the name suggests, this example demonstrates how to use an RG to perform duplicate checking, but you can easily adapt the process to keep track of selected records. I use RG's for this all the time. By using the RG, it eliminates the need to LOOP through the datablock - which can be very time consuming. Instead, you loop through the RG and only navigate to the specific records you need too in order to process that record. Looping through the RG is much faster than looping through the block - especially if you have a lot of records displayed in your block.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to deselect the default option in dropdown list in Adobe Pro XI?

    I know how to change the default option in properties, but I don't want there to be a default at all. When the user opens the form, I want the fields to be blank.

    Screenshot 1: form when opened with Reader as the user will open it.
    Screenshot 2: the "Physical Needed" option where I cannot seem to deselect the default
    Screenshot 3: the "Hearing Test Needed" option where there is no default - this is what I want!!!
    When I first made the file, I made several drop-down lists as you can see here and when the form is first opened, they are blank. Then later, when I had to make some changes to the options, the program selects a default, like the "Physical Needed: field: (I set it to None, since I couldn't make it blank.) I like the form to be blank when opened so the person filling it out can easily see which options still need a selection. I don't want those 2 defaults of "None". I've tried copying a existing field, but as soon as I make changes to the selection options in Properties, a default option is default is set and I cannot seem to un-highlight all the options in the Item List:.

  • Deselect a list box cell

    I've pounded for several hours and searched the forums and have come up cold.
    I would like a present a list box with no cells selected. When the user selects only a cell
    it highlights for 1 second and then deselects, awaiting for another user selection. 
    What is the proper programmatic way of doing this. I've been using event structured code. 

    I did head in that direction and it was an almost.
    Here is that VI. It generates events in non cell areas.
    It seems what I'm looking for is what
    I assumed was a seemingly basic list box function.
    Generate an event for a mouse hit in a cell (only) 
    Attachments:
    Almost2.vi 2.zip ‏13 KB

  • Mail + Gmail deselects messages in list

    My company recently switched to Google Apps (Gmail) for our mail. I've got my IMAP account setup in Mail, but have an incredibly frustrating problem. As I'm deleting messages in the inbox, the message pane will deselect the current message, apparently as it deletes/resyncs with the server. If I have 4 unread messages, and rapidly delete the first 3, the 4th will be selected for a brief moment, and then no message will be selected. Meaning I have to click on the 4th message to read and/or delete it. Sometimes it's deselected multiple times after clicking on it, meaning I have to click on the message repeatedly to even read it. Once the Activity window shows activity has ceased, the problem stops. Sometimes it will even scroll the window to the top of my Inbox, so I will have to scroll down and click on the message that should already be selected.
    I've done quite a bit of searching on Google and in these forums and haven't found a similar problem. This is surprising, since 3 out of 3 Mail users in my office have the exact same problem. I never had this problem before switching to Gmail (our previous mail server was Qmail).
    Help please! This basically makes Mail unusable for me since I get hundreds of emails per day. I loathe to switch to Thunderbird, but I may have to if I can't figure this out (does Thunderbird have decent threading yet?)
    Thanks!

    Fixed!
    Solution:
    * Enable "Advanced IMAP controls" in Google Labs
    * Change these settings in IMAP/POP section:
    * Auto-expunge: Do not automatically expunge messages
    * When a message is expunged from the last visible IMAP folder: Move the message to the Trash
    * For Mail.app settings, follow instructions here: http://mail.google.com/support/bin/answer.py?answer=78892#

  • ALV list -Runtime error using the Spreadsheet button(CTRL+SHIFT+F7)

    Hi,
    We are on ECC6.0.When ever I try to use the button 'Spreadsheet' (CTRLSHIFTF7) it gives me the following runtime error.It works fine if I use the export button.Also it works for ALV grid.Issue is only with ALV list.
    Can you pelase advise waht could be the issue.
    Thanks
    Venkat
    Runtime Errors         GETWA_NOT_ASSIGNED
    Date and Time          08.06.2009 16:02:22
    Short text
    Field symbol has not yet been assigned.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "CL_SALV_BS_TT_RESULT_TABLE====CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    Error analysis
    You attempted to access an unassigned field symbol
    (data segment 32781).
    This error may occur if
    - You address a typed field symbol before it has been set with
    ASSIGN
    - You address a field symbol that pointed to the line of an
    internal table that was deleted
    - You address a field symbol that was previously reset using
    UNASSIGN or that pointed to a local field that no
    longer exists
    - You address a global function interface, although the
    respective function module is not active - that is, is
    not in the list of active calls. The list of active calls
    can be taken from this short dump.
    Trigger Location of Runtime Error
    Program                                 CL_SALV_BS_TT_RESULT_TABLE====CP
    Include                                 CL_SALV_BS_TT_RESULT_TABLE====CM00L
    Row                                     165
    Module type                             (METHOD)
    Module Name                             GET_CELL_VALUE
    Source Code Extract
    Line
    SourceCde
    135
    call method cl_alv_xslt_transform=>get_days_since_1900
    136
    exporting
    137
    i_date = l_date
    138
    receiving
    139
    e_num  = attribute01.
    140
    141
    elseif ls_attribute-s_dfies-inttype eq cl_abap_typedescr=>typekind_time. "Time
    142
    data:
    143
    l_time type t.
    144
    145
    l_time = <l_data>.
    146
    147
    call method cl_alv_xslt_transform=>get_isotime_from_inttime
    148
    exporting
    149
    i_value = l_time
    150
    receiving
    151
    e_value = value.
    152
    153
    *... fill attribute01 with percent value of actual day
    154
    call method cl_alv_xslt_transform=>get_percent_of_act_day
    155
    exporting
    156
    i_time = l_time
    157
    receiving
    158
    e_num  = attribute01.
    159
    160
    elseif ls_attribute-s_dfies-inttype ca if_salv_bs_log_exp_operand=>c_numeric and
    161
    ls_attribute-s_dfies-convexit is initial.
    162
    case ls_attribute-s_dfies-reference_field_type.
    163
    when if_salv_bs_c_data=>reffieldtype_curr.
    164
    *... get iso value for currency value
    >>>>>
    call method cl_alv_xslt_transform=>get_isonum_from_intnum
    166
    exporting
    167
    i_value    = <l_data>
    168
    i_currency = <l_reference>
    169
    i_decimals = ls_attribute-s_dfies-decimals
    170
    importing
    171
    e_value    = l_isovalue.
    172
    173
    when if_salv_bs_c_data=>reffieldtype_quan.
    174
    *... get iso value for quantity value
    175
    call method cl_alv_xslt_transform=>get_isonum_from_intnum
    176
    exporting
    177
    i_value    = <l_data>
    178
    i_unit     = <l_reference>
    179
    i_decimals = ls_attribute-s_dfies-decimals
    180
    importing
    181
    e_value    = l_isovalue.
    182
    183
    when others.
    184
    *... get iso value for value

    Hi Pinaki,
    Thanks for your reply.
    below is my code.
    data: t_fieldcat type slis_t_fieldcat_alv,
            w_fieldcat like line of t_fieldcat,
            w_layout   type slis_layout_alv,
            t_sort     type slis_t_sortinfo_alv,
            w_sort     like line of t_sort,
            t_events   type slis_t_event,
            w_events   like line of t_events.
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
           exporting
                i_structure_name   = 'ZSD_ORDERS'
                i_bypassing_buffer = 'X'
           changing
                ct_fieldcat        = t_fieldcat.
      data: l_lines_fieldcat type i.
      describe table t_fieldcat lines l_lines_fieldcat.
      clear: w_fieldcat.:
      w_fieldcat-col_pos = l_lines_fieldcat + 1.
      w_fieldcat-datatype = 'QUAN'.
      w_fieldcat-just = ' '.
      w_fieldcat-do_sum = ' '.
      w_fieldcat-fieldname = 'ZZSCLQTY'.
      w_fieldcat-tabname = 'T_DATA'.
      w_fieldcat-qfieldname = 'VRKME'.
      w_fieldcat-seltext_s = text-a01.
      w_fieldcat-seltext_m = text-a01.
      w_fieldcat-seltext_l = text-a01.
      append w_fieldcat to t_fieldcat.
    Modify column headings
      loop at t_fieldcat into w_fieldcat.
        case w_fieldcat-fieldname.
          when 'MATNR'.
            w_fieldcat-no_zero = 'X'.
          when 'ZZPRICECHECK'.
            w_fieldcat-reptext_ddic = text-l01.
          when 'KZWI5'.
            w_fieldcat-reptext_ddic = text-l02.
          when 'VBELN'.
            w_fieldcat-hotspot = 'X'.
          when 'BMENG'.
            w_fieldcat-do_sum = 'X'.
          when 'COUNTER'.
            w_fieldcat-do_sum = 'X'.
            w_fieldcat-reptext_ddic = text-l03.
          when 'OBJDE'.
            w_fieldcat-reptext_ddic = 'Obj ID'.
              endcase.
        modify t_fieldcat from w_fieldcat.
      endloop.
    Format output options
      clear w_layout.
      w_layout-colwidth_optimize    = 'X'.
      w_layout-zebra                = 'X'.
      w_layout-get_selinfos         = 'X'.
      w_layout-detail_initial_lines = 'X'.
      w_layout-group_change_edit    = 'X'.
    Specify list processing events
      w_events-name = 'TOP_OF_PAGE'.
      w_events-form = 'TOP_OF_PAGE'.
      append w_events to t_events.
    Fit Add List Variant from Selection Screen               "003
      clear: w_variant.
      w_variant-report  = sy-repid.
      w_variant-variant = sp_vari.
    end Fit02
      call function 'REUSE_ALV_LIST_DISPLAY'
           exporting
                i_callback_program      = w_repid
                is_layout               = w_layout
                it_sort                 = t_sort
                i_callback_user_command = 'USER_COMMAND'
                is_variant              = w_variant
                i_save                  = 'A'
                it_fieldcat             = t_fieldcat[]
                it_events               = t_events[]
           tables
                t_outtab                = t_data.
    endform.

  • Prevent deselection of DataGrid list item

    I have a DataGrid that i need to keep selectable, but a client has noticed that they can hold down the CTRL button while selecting a row and it totally breaks the swf file. So i would like to disable the CTRL button in that particular DataGrid but if i have to do it throughout the swf file thats also okay. PS i am developing in Flex 1.5

    drawItem looks like:
    protected function drawItem(item:IListItemRenderer,
                                    selected:Boolean = false,
                                    highlighted:Boolean = false,
                                    caret:Boolean = false,
                                    transition:Boolean = false):void
    If I override it and make it public, what would I put for the item parameter??

  • Hello, i am using itunes 11.1.5 with a MAC and facing the following issue. When i play a playlist and decide to deselect the next tune in the list, itunes does not work as expected and play the tune !

    for instance if i am playing tune #20 and i deselect #21, #21 will still be played. I need to deselect #21 before ITunes has started to play #20. this is a strange behaviour. I am using ITUNES as a DJ again after 2 years off and i don't remember it did behave like this before. Is there a bug with 11.1.5 ?

    http://support.apple.com/kb/PH12131

Maybe you are looking for