Combo Box Strange Sorting Behavior [Flex 1.5]

The combobox does not sort if i set [Editable=true] using
Flex 1.5.
But works and sort fine and give accurate results if i remove
Editable attribute from <ComboBox> tag.
Initially i hv taken editable combobox and wants to sort the
dataprovider as user enters the letter.
but in vain.
how can i achive the above.
The keyDown event calls the following function:
function
setInitialItem(t:mx.controls.ComboBox,sDataValueInit:String):Void
t.open();
if(sDataValueInit.length==1 && (Key.getCode() >=
65 && Key.getCode() <= 90))
t.dataProvider.sortOn(sDataValueInit,Array.UNIQUESORT );
}else if(sDataValueInit.length==2 && (Key.getCode()
>= 65 && Key.getCode() <= 90))
t.dataProvider.sortOn(sDataValueInit,Array.UNIQUESORT );
}else if(sDataValueInit.length==3 && (Key.getCode()
>= 65 && Key.getCode() <= 90))
t.dataProvider.sortOn(sDataValueInit,Array.UNIQUESORT );
}else if(Key.getCode() == 13 || Key.getCode() ==32){
t.close();
Thanks in Advance!
Vinay

If U have the list item as a combo box the maximun length property should be equal to the maximum length of the data displayed in the list.
In Ur case,
The length of 'FALSE' is 5.
even the value to be stored is only '0'.
The maximum length of the field should be 5.
I don't think it's a bug. The very purpose of combo box is to let the users enter the new data at run time.

Similar Messages

  • Analyzer 6.1 Combo-box list sort

    Does anyone know of an easy way to sort lists in combo-boxes (or check-boxes, etc...)? Thank you for your help.

    You may want to try the following.Make sure:1) you have sourced out anlayzer.sh script2) Use the set command to set the path and ICU_DATA3) Turn On ADM tracingessbase connection issue\unable to connect to essbase from analyzer 6.1Note____To Resolve:1. Verify the Essbase installation\API directories are on the machine.2. Verify the following "strings" have been appended to their correspondingEnvironment Variable for Analyzer and Essbase:(Examples below)For SOLARIS:Variable: STRING:ARBORPATH /opt/olap81PATH $ARBORPATH/bin:$PATHLD_LIBRARY_PATH $ARBORPATH/dlls:$ARBORPATH/bin:$LD_LIBRARY_PATHPATH /opt/hyperion/analyzer/adm/bin/solaris:$PATHLD_LIBRARY_PATH /opt/hyperion/analyzer/adm/bin/solaris:$LD_LIBRARY_PATHICU_DATA /opt/hyperion/analyzer/adm/bin/solaris/HssEssDriver/I had the similar error message and adding the above to the path resolved the issue.Regards,Peter Tupker

  • Strange sorting behavior with iOS calendars

    My wife and I both have a two calendars (personal and business) which we are sharing with each other. So four shared calendars, two form my wife and two form myself. All four calendars are iCloud-calendars, two from my wife's account and two from mine.
    All calendars are syncing with several devices: one iMac, two MacBooks, two iPads and three iPhones. Today I found out that on the iOS devices the sorting of the calendars has issues.
    My preferred order is 1) my personal, 2) my business, 3) wife personal and 4) wife business. On iCloud (via browser) this is fine. On al the OS X devices also, but on the iOS devices 3 and 4 are switched (1, 2, 4, 3 instead of 1, 2, 3, 4). I can reorder them to 1,3,4,2 and several other options on the iOS devices, but 1,2,3,4 is not possible. Any ideas?

    I agree Mike; the "IT pride" is a wide spread issue in this line of work that leaves a lame taste of the profession.
    Long story short. It was probably corrupt image though there isn't a definitive way to confirm that (again, I try to stay away from the IT people assumptions).
    What is back and white is the remedy. After formatting the flash and uploading the SAME image the SNMP problem went away.
    Thanks
    ~B

  • Need to detect when an item is clicked in a combo box in flex 3

    Hello
    I am having a check box and a combo box whenever any selection is made in combo box (current selection may be same as previous selection), I need to select the check box.
    By default the 1st item in combo box is selected and check box is unselected. Now I want that while 1st item is clicked in combo box (although it is selected) , the check box must be selected.
    I have currently used the change event of combo box to do my task. But it is not working if I click on same item as selected item in combo box.
    Also, I thought to use close event of combo box, but that event dispatches in 4 situations out of which I can distinguish only 1 situation from DropDownEvent(for close).
    Please help me regarding this.
    I am using flex sdk 3.5
    Thanks in advance.

    You can use the Close Event to distinguish it.
    To pull out which item has been selected in the combo box, you use the code (in as3)
    ComboBox(event.target).selectedItem.label
    and through the the use of an if statement
    if (ComboBox(event.target).selectedItem.label == "labelName")
    you can distinguish the single situation from the others.

  • Strange Permissions Behavior with Public/Private Drop Box

    Strange Permissions Behavior with Non-Course Drop Box
    In an effort to promote iTunes U on campus this semester (and to get people working with audio and video more) we're having a contest in which people can submit personal or group audio/video projects.
    This being an iTunes promo, we intend for students to submit their contributions via a drop box.
    To that end, I began experimenting with drop boxes in iTunes U, which I haven't done much of previously. I've created a course called "iTunes U Drop Box Test" under "Campus Events". Within that, I have two tabs: "Featured Submissions" and "Dropbox". My goal with this drop box was to allow faculty, students and college folks the ability to use the drop box ("college" being a role I've defined for those who don't fit into the faculty/student roles).
    When I first started experimenting, access to the "iTunes U Drop Box Test" course looked like this:
    --- Credentials (System) ---
    Edit: Administrator@urn:mace:itunesu.com:sites:lafayette.edu
    Download: Authenticated@urn:mace:itunesu.com:sites:lafayette.edu
    Download: Unauthenticated@urn:mace:itunesu.com:sites:lafayette.edu
    Download: All@urn:mace:itunesu.com:sites:lafayette.edu
    --- Credentials ----
    Download: College@urn:mace:lafayette.edu
    Download: Instructor@urn:mace:lafayette.edu
    Download: Instructor@urn:mace:lafayette.edu:classes:${IDENTIFIER}
    Download: Student@urn:mace:lafayette.edu
    Download: Student@urn:mace:lafayette.edu:classes:${IDENTIFIER}
    For the "Featured" Submissions tab, I gave the non-system credentials the "download" right, and for the "Dropbox" tab I gave the non-system credentials the "dropbox" right.
    My understanding of this setup is that everyone should have had the ability to view the course and the contents of the "Featured Submissions" tab and that those in the College/Instructor/Student roles would be able to upload files via the "Dropbox" tab ... but not see the contents of said tab after the files were uploaded (aside from any files they uploaded themselves).
    This is not the behavior we saw however. While the College/Instructor/Student roles could upload files to the dropbox, everyone (including the unauthenticated public) was able to see all of the contents of the dropbox.
    The only way I could get this to work as advertised was to change all of the system credentials save the "Administrator" to "No Access":
    --- Credentials (System) ---
    Edit: Administrator@urn:mace:itunesu.com:sites:lafayette.edu
    No Access: Authenticated@urn:mace:itunesu.com:sites:lafayette.edu
    No Access: Unauthenticated@urn:mace:itunesu.com:sites:lafayette.edu
    No Access: All@urn:mace:itunesu.com:sites:lafayette.edu
    Once I did this, everything worked as advertised: College/Instructor/Student roles could upload tracks, and the "Dropbox" tab would only display tracks they uploaded.
    So my question is ... is this the correct behavior for the drop box? It looks like when the system credentials are in play, they're simply overriding whatever the normal "view" rule is for the drop box, which doesn't seem right.

    Your current configuration where things work as you wanted does seem correct to me. You are not using any System Credentials to accomplish the functionality and that's fine.
    Here's some more info to clarify how / why this is working for you and why you had to set "No Access" for the System Credentials:
    The System Credential "Authenticated@..." is going to get assigned to any user that goes through your transfer script. Even if you transfer script assigns no credentials to a user, upon entering iTunes U they will have at least 1 - the "Authenticated@..." credential. Therefore, unless you block access using "No Access", any user that passes through your transfer script is going to be able to access the area in question.
    When you change values for "Unauthenticated@..." or "All@..." you are defining what someone that DOES NOT pass through your transfer script can do. You want both of those to be "No Access" at the top level of your site if you do not want unauthenticated visitors.
    The distinction between "Unauthenticated" and "All" is that "All" applies to all users whether they pass through the transfer script or not.
    Here's another way to remember things:
    User passes through your transfer script, iTunes U automatically assigns:
    Authenticated@....
    All@....
    User does not pass through your transfer script and instead access your iTunes U site through derivable URL*, they get assigned:
    Unauthenticated@....
    All@....
    *The derivable URL for a site is: http://deimos.apple.com/WebObjects/Core.woa/Browse/site-domain-name
      Mac OS X (10.4.6)  

  • Flex 2.0 - Combo box /TextField Population

    Hi,
    This is my first post on this forum. I have downloaded a
    trial version of Flex 2.0, and I am creating a small application. I
    have a combo box that has a few items( around 6 options), when
    these items are selected a text box should update with text read in
    from a txt file. I am able to get the combo working, but I don't
    know how to read the text in from the txt file, so each option will
    load in it's related text content from a txf file. How do I trigger
    this from the combo ?
    I have looked in at the help, but they say you have to
    preload and use URL Loader...is this true ?...How to go about it ?
    Please help, you can contact me at [email protected]

    create a new project create a data folder and within a
    data.xml paste this in the file:
    <?xml version="1.0" encoding="UTF-8"?>
    <RECORDS>
    <RECORD>
    <ID>1</ID>
    <city>Suite 127 17008-90 Avenue</city>
    <maplink>
    http://fb.411.ca/gmap.php?postal_code=T5T1L6anddata=a%3A12%3A%7Bs%3A11%3A%22customer_id%22 %3Bs%3A7%3A%224313020%22%3Bs%3A11%3A%22CompanyName%22%3Bs%3A24%3A%22Biard+Financial+Servic es%22%3Bs%3A11%3A%22AddressFl%22%3Bs%3A26%3A%22Suite+127%2C+17008-90+Avenue</maplink>
    <phone>(780) 907-9267</phone>
    <prov>AB</prov>
    <pcode>T5T1L6</pcode>
    <uuid>A1A99A00-CEC7-C631-7940416FFBB9B6EE</uuid>
    <email>""</email>
    <zoneID>""</zoneID>
    </RECORD>
    <RECORD>
    <ID>2</ID>
    <name>Bielertgary</name>
    <city>Barr</city>
    <maplink>
    http://fb.411.ca/gmap.php?postal_code=T0G0E0anddata=a%3A11%3A%7Bs%3A11%3A%22customer_id%22 %3Bs%3A5%3A%2263368%22%3Bs%3A11%3A%22CompanyName%22%3Bs%3A11%3A%22Bielertgary%22%3Bs%3A11% 3A%22AddressFl%22%3Bs%3A11%3A%225024+49a+St%22%3Bs%3A11%3A%22AddressCity%22</maplink>
    <phone>(780) 674-2505</phone>
    <prov>AB</prov>
    <address>5024 49a St</address>
    <pcode>T0G0E0</pcode>
    <uuid>A1A99A10-C7A6-2C3F-17FE147F162E4AC3</uuid>
    <email>""</email>
    <zoneID>""</zoneID>
    </RECORD>
    <RECORD>
    <ID>3</ID>
    <name>Bienvenu Michel Compt Agree</name>
    <city>Cowansville</city>
    <maplink>
    http://fb.411.ca/gmap.php?postal_code=J2K1A1anddata=a%3A11%3A%7Bs%3A11%3A%22customer_id%22 %3Bs%3A7%3A%224135469%22%3Bs%3A11%3A%22CompanyName%22%3Bs%3A27%3A%22Bienvenu+Michel+Compt+ Agree%22%3Bs%3A11%3A%22AddressFl%22%3Bs%3A20%3A%224150+Ste+Catherine+W%22%3</maplink>
    <phone>(450) 931-0841</phone>
    <prov>QC</prov>
    <address>4150 Ste Catherine W</address>
    <pcode>J2K1A1</pcode>
    <uuid>A1A99A20-0163-5D90-7585D3C454987F6A</uuid>
    <email>""</email>
    <zoneID>Granby</zoneID>
    </RECORD>
    <RECORD>
    <ID>4</ID>
    <name>Big Red Income Tax and Accounting</name>
    <fax>(780) 471-6221</fax>
    <city>Edmonton</city>
    <maplink>
    http://fb.411.ca/gmap.php?postal_code=T5G1K7anddata=a%3A12%3A%7Bs%3A11%3A%22customer_id%22 %3Bs%3A5%3A%2250452%22%3Bs%3A11%3A%22CompanyName%22%3Bs%3A31%3A%22Big+Red+Income+Tax+%26+A ccounting%22%3Bs%3A11%3A%22AddressFl%22%3Bs%3A14%3A%2211107+95+St+Nw%22%3Bs</maplink>
    <phone>(780) 471-6251</phone>
    <prov>AB</prov>
    <address>11107 95 St Nw</address>
    <pcode>T5G1K7</pcode>
    <uuid>A1A99A2F-9E3F-7F4A-A47771D9B6638979</uuid>
    <email>""</email>
    <zoneID>""</zoneID>
    </RECORD>
    <RECORD>
    <ID>5</ID>
    <name>Biggar Accounting Services</name>
    <city>Biggar</city>
    <maplink>
    http://fb.411.ca/gmap.php?postal_code=S0K0M0anddata=a%3A11%3A%7Bs%3A11%3A%22customer_id%22 %3Bs%3A5%3A%2219880%22%3Bs%3A11%3A%22CompanyName%22%3Bs%3A26%3A%22Biggar+Accounting+Servic es%22%3Bs%3A11%3A%22AddressFl%22%3Bs%3A11%3A%22207+Main+St%22%3Bs%3A11%3A%2</maplink>
    <phone>(306) 948-5133</phone>
    <prov>SK</prov>
    <address>207 Main St</address>
    <pcode>S0K0M0</pcode>
    <uuid>A1A99A3F-BCAF-7437-53DCE3CD8EAC334B</uuid>
    <email>""</email>
    <zoneID>""</zoneID>
    </RECORD>
    <RECORD>
    <ID>6</ID>
    <name>Biggs Gary L Chartered Accountant</name>
    <city>Edmonton</city>
    <maplink>
    http://fb.411.ca/gmap.php?postal_code=T6J6L1anddata=a%3A11%3A%7Bs%3A11%3A%22customer_id%22 %3Bs%3A5%3A%2242764%22%3Bs%3A11%3A%22CompanyName%22%3Bs%3A33%3A%22Biggs+Gary+L+Chartered+A ccountant%22%3Bs%3A11%3A%22AddressFl%22%3Bs%3A25%3A%2210407+40+Avenue+North</maplink>
    <phone>(780) 448-9221</phone>
    <prov>AB</prov>
    <address>10407 40 Avenue Northwest</address>
    <pcode>T6J6L1</pcode>
    <uuid>A1A99A4F-E8ED-C59F-58C5FC40A613E699</uuid>
    <email>""</email>
    <zoneID>""</zoneID>
    </RECORD>
    <RECORD>
    <ID>7</ID>
    <name>Bigras Roger C A</name>
    <fax>(450) 625-0641</fax>
    <city>Laval</city>
    <maplink>
    http://fb.411.ca/gmap.php?postal_code=H7P4A3anddata=a%3A12%3A%7Bs%3A11%3A%22customer_id%22 %3Bs%3A7%3A%223947434%22%3Bs%3A11%3A%22CompanyName%22%3Bs%3A16%3A%22Bigras+Roger+C+A%22%3B s%3A11%3A%22AddressFl%22%3Bs%3A26%3A%223180+Bd+Dagenais+O+Fabrvle%22%3Bs%3A</maplink>
    <phone>(450) 622-6430</phone>
    <prov>ON</prov>
    <address>3180 Bd Dagenais O Fabrvle</address>
    <uuid>A1A99A5E-DF97-BF84-6863D3385A2A5B86</uuid>
    <email>""</email>
    <zoneID>""</zoneID>
    </RECORD>
    </RECORDS>
    then in the main application file paste this
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="xmldata.send();">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    import mx.utils.ObjectUtil;
    import mx.controls.Alert;
    [Bindable]
    public var mxdata:Object;
    public function httpHandler(event:ResultEvent):void{
    //the property lastresult dumps the object in the
    application then the xpath allows you to get the propertysa you
    want...
    mxdata = xmldata.lastResult.RECORDS.RECORD;
    private function server_fault(event:FaultEvent):void
    Alert.show( ObjectUtil.toString(event.fault) );
    ]]>
    </mx:Script>
    <mx:HTTPService url="data/data.xml" id="xmldata"
    result="httpHandler(event)" fault="server_fault(event)"/>
    <mx:DataGrid dataProvider="{mxdata}"/>
    <mx:ComboBox dataProvider="{mxdata}" labelField="name"
    id="selectedData" x="10" y="179"/>
    <mx:Form x="10" y="240">
    <mx:TextInput id="ID"
    text="{selectedData.selectedItem.ID}"/>
    <mx:TextInput id="nameui"
    text="{selectedData.selectedItem.name}"/>
    <mx:TextInput id="fax"
    text="{selectedData.selectedItem.fax}"/>
    <mx:TextInput id="city"
    text="{selectedData.selectedItem.city}"/>
    <mx:TextInput id="maplink"
    text="{selectedData.selectedItem.maplink}"/>
    <mx:TextInput id="phone"
    text="{selectedData.selectedItem.phone}"/>
    <mx:TextInput id="prov"
    text="{selectedData.selectedItem.prov}"/>
    <mx:TextInput id="address"
    text="{selectedData.selectedItem.address}"/>
    <mx:TextInput id="pcode"
    text="{selectedData.selectedItem.pcode}"/>
    <mx:TextInput id="uuid"
    text="{selectedData.selectedItem.uuid}"/>
    <mx:TextInput id="email"
    text="{selectedData.selectedItem.email}"/>
    <mx:TextInput id="zoneID"
    text="{selectedData.selectedItem.zoneID}"/>
    </mx:Form>
    </mx:Application>
    i hope this helps : )

  • Strange behaviour with combo boxes.

    Has anyone else noticed strange behaviour of combo boxes with applets?
    What happens is that on selecting the combo drop down, the dialogue the combo is sitting on moves behind its parent window. You just end up seeing the combo list, and no dialogue. Select a combo item, and sometimes the dialogue reappears, and sometimes it is still hidden.
    I've only seen this whilst running an applet in browsers. In Eclipse I don't see the behaviour.
    The behaviour is also very intermittent.
    I'm using Java Plug-in 1.6.0_10-rc2, Using JRE version 1.6.0_10-rc2 Java HotSpot(TM) Client VM, on Windows Vista, Google Chrome browser.
    I'd raise it as a bug, it certainly seems quite serious, but I don't have a reliable test case.
    I have a work around, on all my dialogues with combo's on them, I have setAlwaysOnTop(true). Not really the correct behaviour though.

    GeoffTitmuss wrote:
    No, I believe I am just using Swing components.Ok, then I'm out of ideas

  • Strange behaviour with my updating of combo box

    public class EditVideoDialog extends JPanel implements ActionListener{
         JTextField text_Name, text_Price, text_Producer, path_Picture;
         JTextArea textarea_Description;
         public JComboBox combo_Genre, combo_Name;
         String old_VideoName;
         Vector <String> myVideoName = new Vector <String>();
         public EditVideoDialog(){
         public EditVideoDialog(Vector <String> myVideoName){          
              combo_Name = new JComboBox();
              combo_Name.setEditable(false);
              combo_Name.setMaximumRowCount(4);
              combo_Name.setPreferredSize(new Dimension(300,25));
              currentVideoName(myVideoName);
         //Function to set current video name
         public void currentVideoName(Vector <String>videoName){
              combo_Name.removeAllItems();
              combo_Name.addItem("");
              for(int k =0; k<videoName.size(); k++){
                   combo_Name.addItem(videoName.get(k));
    }I tried with the script above, the combo_box first got compiled nicely after retrieving data from the database.
    However, when i tried to do the updating of combo box with function currentVideoName, it fails.
    I also tried puttng a ComboBoxModel inside my function but it fails. It just doesn't get updated...
    ComboBoxModel model = new DefaultComboBoxModel(myVideoName);
    combo_Name.setModel(model);can someone advise me or show me some simple code on this?
    Edited by: diskhub on Mar 16, 2008 11:27 AM

    http://forum.java.sun.com/thread.jspa?threadID=5275345

  • Strange Combo Box CPU Usage

    I've been having some odd behaviour with combo box behaviour in LV8.2.  When the mouse is hovering over the combo box and the down key on the keyboard is pressed, the CPU usage goes to 100%.  Moving the mouse off of the combo box causes the CPU usage to drop. 
    Does anyone have any insight as to why this is happening or, hopefully, how this can be fixed?
    thanks,
    bryan
    Attachments:
    comboboxtester.vi ‏6 KB

    bkling wrote:
    oh, i've tried this on two PCs as well, one with dual cores.  One the dual core machine one of the cores goes to 100% (giving a total usage of 50% as ravens fan noticed).  One the single core the CPU goes to 100%
    Actually what was kind of odd about mine was that the usage was 50%, but the 2 windows showing each core seemed to mirror each other and were both showing about 50% as well.  Not sure what that means.

  • Spaces always sends  to the same Desktop, drop-lists and combo boxes broken

    I have a new behavior that has just started. When I click on the Spaces icon on my dock - it has several weird behaviors. First, no matter what I click on - it will only send me to the upper right desktop. Second, when I move the mouse while using spaces - the animation flickers very strangely. Third, the animation when Spaces opens and closes is VERY VERY slow and it takes several seconds between clicking the Spaces icon in the dock to when the animation is complete and you can select a desktop.
    Possibly related (because it started at the same time) all of the auto-complete menus (i.e. - those menus that help you type faster when you enter text into HTML forms etc.) are now un-usable. They flicker in and out so quickly that I cannot click on them. Ditto for any sort of combo-box or drop list control in any application.
    Has anyone else started experiencing this problem?
    Message was edited by: bmm727
    Message was edited by: bmm727

    I'll throw out some other ideas.
    A. System wide freak-outs can also be caused by bad or duplicate fonts installed or important fonts missing. Open Font Book and see if any fonts have a dot next to them. If you move or change fonts that are necessary for apps you get many problems.Here is a list of necessary fonts. The system fonts will not allow you to move them so it probably is not one of them. You can also try cleaning the system and font caches using Onyx.
    B. Incomplete upgrades can leave your system in a mess. It would be easier to archive and install then to try and figure out what pieces you are missing.
    C. I would also suspect any third party utilities you have installed, especially in the System Preferences or that activate on start up.
    System Prefs:
    • Out of date utilities for your third party mouse. Try updating the utility.
    • Haxies for the system- try turning them off.
    D. Antivirus programs often cause more harm then good. Do you have any installed? On Windows machine I have used when your subscription expires the software cripples your system. The solution is to completely remove it or renew your subscription.
    E. If you are using a wireless mouse check the batteries.
    Kurt

  • Reg - 'F1' key event in Combo box

    Hi,
    Requirement:
          I have requirement that to launch a browser window on press of 'F1' key while the movie (swf) has focus. I did it and working fine for me in web application.
    Problem statement:
          When a movie had been launched and having focus in 'Combo box' (which has list of items starts with A to Z letters) control then, i pressed 'F1' key but the browser window has not been launched, instead 'Combo box's key action event get fired and the item starts with the letter 'P' has been selected in the combo box list. If now again i press 'F1' key the browser window has launched as per my requirement.
          This behavior is happening whenever the launched movie has focus in 'Combo box'; otherwise if the focus is on some other control like TextInput etc., no problem for me. One more information, if the Combo box doesn't have any item starts with the letter 'P' then no problem for me.
          I tried to understand the behavior of combo, but still i don't have any clue. Please share your knowledge/thoughts.
    Environment:
          Flex builder 3.5
          Adobe flash player 11.2
          Windows XP SP3
    Regards,
    Mani

    Hi,
    I just overridden the keydown handler function in ComboBox component to avoid its own event propagation behavior if 'F1' key is pressed and its working fine for me.
    Thanks for all,
    -Mani

  • Cosmetic Glitch when Replacing a Silver Style Combo Box by a String

    As the title says, if you replace a Silver Style Combo Box by a String (same data type), things turn ugly:
    Nothing of the sort happens with the other styles as can be seen above too.

    Hi X
    Yea I get the same behavior in 2012 and 2013. A workaround for this would be to replace the original control or indicator with a non-silver version of the control and then replace that control with the desired silver style control. This seems to work for me.
    Paolo F.
    National Instruments
    Applications Engineer

  • Auto Complete Combo Boxes?

    Does anyone know of auto-completing combo boxes written in Java? I have a dirty hack that sort of works, but if you type too fast the caret jumps to the end of the text it thinks you are typing instead of selecting the characters that you haven't typed yet.
    Any help would be greatly appreciated.

    Jrabi,
    Below is the code for KComboBoxes. Please be aware that this code comes with NO guarantee. It works for me, but that doesn't necessarily mean that it will work for you. If you have any questions about the code I will be happy to answer them. Make sure that once you create an instance of KComboBox that you set it as editable or the auto complete function won't work.
    package pubprint; //make this package whatever your package is
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    * Title: <BR>
    * Description: <BR>
    * Copyright: Copyright (c) 2002<BR>
    * Company: <BR>
    * @author Kevin J. Keen
    * @version 0.5
    public class KComboBox extends JComboBox implements KeyListener {
    private ComboBoxModel myModel;
    private KeySelectionManager myKeyManager;
    private ComboBoxEditor myEditor;
    private JTextField txtEditor;
    private long timeOfLastEvent = 0;
    //Constructors
    public KComboBox() {
    super();
    myModel = super.getModel();
    myKeyManager = super.getKeySelectionManager();
    myEditor = super.getEditor();
    txtEditor = (JTextField)myEditor.getEditorComponent();
    txtEditor.addKeyListener(this);
    public KComboBox(ComboBoxModel daModel) {
    super(daModel);
    myModel = super.getModel();
    myKeyManager = super.getKeySelectionManager();
    myEditor = super.getEditor();
    txtEditor = (JTextField)myEditor.getEditorComponent();
    txtEditor.addKeyListener(this);
    public KComboBox(Object[] items) {
    super(items);
    myModel = super.getModel();
    myKeyManager = super.getKeySelectionManager();
    myEditor = super.getEditor();
    txtEditor = (JTextField)myEditor.getEditorComponent();
    txtEditor.addKeyListener(this);
    public KComboBox(Vector items) {
    super(items);
    myModel = super.getModel();
    myKeyManager = super.getKeySelectionManager();
    myEditor = super.getEditor();
    txtEditor = (JTextField)myEditor.getEditorComponent();
    txtEditor.addKeyListener(this);
    //Key listener methods
    public synchronized void keyReleased(KeyEvent e) {
    if(e.getKeyCode() == KeyEvent.VK_SHIFT || e.getKeyCode() == KeyEvent.VK_TAB) {
    return;
    //This IF/ELSE is necessary because without it
    //you can out-type the auto complete and get
    //really weird behavior.
    if((e.getWhen() - timeOfLastEvent) < 100) {
    return;
    else {
    timeOfLastEvent = e.getWhen();
    String temp = txtEditor.getText();
    int hashCode = temp.hashCode();
    for(int i = 0; i < myModel.getSize(); i++) {
    String contents = (String)myModel.getElementAt(i);
    if(contents.startsWith(temp)) {
    int selectionStart = txtEditor.getCaretPosition();
    int selectionEnd = (contents.length());
    //Check to make sure that the value in the text field hasn't changed
    if(txtEditor.getText().hashCode() == hashCode) {
    setSelectedItem(contents);
    selectedItemChanged();
    txtEditor.setSelectionStart(selectionStart);
    txtEditor.setSelectionEnd(selectionEnd);
    return;
    else {
    return;
    public void keyPressed(KeyEvent e) {}
    public void keyTyped(KeyEvent e) {}
    }

  • How to populate data in the data table on combo box change event

    hi
    i am deepak .
    i am very new to JSF.
    my problem is i want to populate data in the datatable on the combo box change event.
    for example ---
    combo box has name of the city. when i will select a city
    the details of the city should populate in the datatable. and if i will select another city then the datatable should change accordingly..
    its urgent
    reply as soon as possible
    thanks in advance

    i am using Rational Application Developer to develop my application.
    i am using a combo box and i am assigning cityName from the SDO.
    and i am declaring a variable in the pageCode eg.
    private String cityName;
    public void setCityName(String cityName){
    this.cityName = cityName;
    public String getCityName(){
    return cityName;
    <h:selectOneMenu id="menu1" styleClass="selectOneMenu" value="#{pc_Test1.loginID}" valueChangeListener="#{pc_Test1.handleMenu1ValueChange}">
                        <f:selectItems
                             value="#{selectitems.pc_Test1.usercombo.LOGINID.LOGINID.toArray}" />
                   </h:selectOneMenu>
                   <hx:behavior event="onchange" target="menu1" behaviorAction="get"
                        targetAction="box1"></hx:behavior>
    and also i am declaring a requestParam type variable named city;
    and at the onChangeEvent i am writing the code
    public void handleMenu1ValueChange(ValueChangeEvent valueChangedEvent) {
    FacesContext context = FacesContext.getCurrentInstance();
    Map requestScope = ext.getApplication().createValueBinding("#{requestScope}").getValue(context);
    requestScope.put("login",(String)valueChangedEvent.getNewValue());
    and also i am creating another SDO which is used to populate data in datatable and in this SDO in the where clause i am using that requestParam .
    it is assigning value in the pageCode variable and in the requestParam but it is not populating the dataTable. i don't no why??
    it is possible that i may not clear at this point.
    please send me the way how my problem can be solved.
    thanks in advance

  • Not able to populate data in the combo box

    Hi Guys,
    I m new to flex development and I want to populate the data
    coming from the databasein the combobox.I am able to get the length
    .but not able to populate the data.
    Can anyone helpme out?
    The code is below:
    The data displayed in the combox box is displayed as
    [object],[object] etc.I m sure that the data is coming from the
    database and its not populated in the combo box.any help is
    appreciated.
    private function getParkinfo(event:ResultEvent):void
    { Alert.show(event.result.length.toString());
    countries.dataProvider = event.result;
    <mx:ComboBox id="countries" />

    What does the data look like in the result? Is it XML? Post a
    sample of it.

Maybe you are looking for

  • How do I change the name of file from save in web receipts folder?

    I use safari to do online banking and when I have paid a bill or transferred money and when it is complete I use save to web receipts folder to keep a record of the transaction. The problem is that the page always has the same name so there is only t

  • Transferring pictures from Iphone/Itunes to PC

    Hi, Basics it may be but how exactly do I do this please? I need to get all the pics of my iphone before sending it back but looking at Itunes for two hours has got me nowhere near getting this minor task done! Can anyone help please? Thanks Dave

  • Combining 2 grahics or more into one

    Using AS3 code, is it possible to combine 2 graphics or more into one? Example : combining a rectangle and a triangle to make a nice arrow?

  • Parallels Desktop 7

    I recently installed Parallels Desktop 7, and the installation and everything went well. Right now, I'm able to control the volume in my Mac partition. However, when I'm using Windows via the program, I am able to control the volume but I still can't

  • My iphone 5 stolen , need to stop it working

    my i phone 5 stolen , i have the serial number only , i need to stop it from being used by others