Extend spark dropdownlist button to the longest item in dataprovider ?

Hi,
simple as stated in the thread's title : I cannot figure out a way to have my spark DropDownLists (no particular skin) extend their width to their longest item width ??
For instance the following :
<s:DropDownList id="aglist" width="100%" requireSelection="false"
                                dataProvider="{model.userAssignedAgents}" labelFunction="agentLabel"
                                change="aglist_changeHandler(event)" open="{aglist.selectedIndex = -1}"/>
when layed on a simple spark panel gets the standard DDList button width, about 50px whatever its content, though its items are much longer than that. So when the button is clicked, the dropdown menu shows some ugly scrollbars.
Do you have any clue ? I've been stuck for hours trying to do what sounds like the very-standard-way-of-setting-dropdownlist-width to me !
Thanks
Matt

Good point.
The main problem I had with the ComboBox is that I don't want to allow "creation" of new elements, so if the typed text doesn't match any element, instead of selectedIndex of -3 it should just keep the old selection. Plus a few other things.
Thinking about it, this is probably my best choice, and if I were to extend a class it should probably be this one.

Similar Messages

  • Adding a button to the Open Items List

    Hiya everyone,  I am trying to add a button to the Open List Items form (formType - 152) which is located in Reports -> Sales & Purchasing -> Open Items List.  When I attempt to add a button to that particular form it does not appear.  The only form I seem to be be able to add a button to is on the main menu.  I have added my code below:
    Private Sub CreateMySimpleForm()
            Dim oItem As SAPbouiCOM.Item
            Dim oButton As SAPbouiCOM.Button
           oForm = SBO_Application.Forms.ActiveForm
            oItem = oForm.Items.Add("80", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 6
            oItem.Width = 65
            oItem.Top = 51
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "View Document"
        End Sub
    Has anyone got any ideas.....Thanks

    I have discovered that the button appears if the Open List Items window is open when I run my code so the button can actually appear on that form.  However, how do I change this line :
    oForm = SBO_Application.Forms.ActiveForm
    so that it specifies that the button will appear only on the Open List Items form.  When I change that line to:
    oForm = SBO_Application.Forms.GetForm("152",1 )    ....it keeps on complaining that it cannot find that form. 
    I'm not sure what the Count is supposed to be in:
    GetForm(Type As String, <b>Count</b> As Integer) 
    If anyone could help me out I would be grateful.....Thanks

  • Spark DropDownList width does not fit largest item.

    In some, but not all cases, when the first item in a Spark DropDownList is not the longest item, when I click on the list to select an item, it resizes to the size of the first item, and thus the other items if selected are truncated.
    Is there a workaround?

    At last, I solved the problem of "determining the longest item" by using the idea mentioned in http://stackoverflow.com/questions/4628368/length-of-a-string-in-pixels.
            var format:TextFormat = new TextFormat();
            format.font = myDropDownList.getStyle("font-family"); // since we're working with a css file for the styling
            format.size = myDropDownList.getStyle("font-size");
    Then for each item in the DropDownList's dataprovider determine this width:
           textField.text = item.value; // in my case
            var width:int = textField.textWidth;
    Once you determined the item with the biggest width, set that one as the DropDownList's typicalItem.

  • Sizing spark dropDownList width the max element lentgh

    In other words, what is the spark alternative to the method measureWidthOfItems() available in mx:ListBase but not in s:ListBase ?
    Thanks,
    Gilles from France

    If you don't need virtualLayout, I think you can turn it off and every
    renderer will be created and the correct measured size will be calculated.
    If you need virtualLayout, you might try using the typicalLayoutElement in
    the layout to compute the widest element.
    Another option is to use a Label somewhere to measure the text and then set
    the longest item as the typicalItem.

  • 10133 ADF LOV: how to get rid of the blank item on top of the list

    Hi,
    I have a fixed list LOV. Because I do not want the user to pick a null value from the list, I picked "selection required" when I created the LOV. when the page has the LOV first loaded, the dropdownlist still has the blank item on the top. If I pick a value and execute, the page is reloaded. Now I access the LOV, it does not show the blank item anymore. How can I get rid of the blank item when the LOV is loaded the first time? Thanks.
    Regards,
    Annie

    I Annie, a workaround is to based your LOV values on a read-only VO or a POJO. Even if your intentions is to avoid to go all the way to the back end.
    Or you can add a "Select One" in the List so your users are aware they need to choose something.
    I tested your case in 10g and 11g and both present the same behavior. I'm opening a bug for 11g. the weird part is that in 10g if you select the include blank item option, actually it adds a double blank space on first load.
    I will update the forum when I get news about it.
    Juan C.
    Message was edited by:
    JCRuiz

  • Show different dropdownlists according to the selected value

    Hi All,
    I need pop up a different dropdownlist according to the selected item in one dropdownlist.
    .e.g. if I select state in one dropdownlist, another dropdownlist contains all the states will show up beside it.
    Any one can help me?
    Thanks a lot

    There are two ways of doing it. Both involve javascript
    1 - capture the onchange event of the first dropdown. Submit the page, and reload it with the correct values for the second dropdown list
    2 - If there aren't that many different options, you can download all the different option lists into your page. Capture the onchange event of the first dropdown, and then use javascript to set the values in the second dropdown box.
    Both have pros and cons. The first option requires a page refresh. The second one requires that you download all possible options to the page.
    Good luck,
    evnafets

  • Hiding the actions on the launched Item.

    Hi All,
        Is it possible to do configuration on UWL to hide the buttons on the launched item. In the Task view we have different items and i know we can hide some action button there by setting the "Exclude action " property in the Iview, but when the user clicks on the description the item is launched . The launched item has some action button displayed on that page. Is it possible to hide those action button through some configuration in the XML??.  Is the configuration limited to only the view and the launch configurations..once the item is launched can we control that as well. The item that is currently being launched is a standard Webdynpro Java application that SAP provided. The tasks are general collaboration tasks..so there is not much configuration done in terms of the view and the launch configuration.
    Regards,
    Rajee.

    So, you are asking that is it possible to configure the actual application that is launched from UWL? If yes, then this has actually not that much to do with UWL. You need to check out the configuration options of the corresponding application itself.
    You need to specify that which application is launched. Let's say that you have iView X that is launched from UWL. Most probably you can do some configurations to the iView itself (iView properties). Maybe you can hide some buttons etc. Maybe the application is actually configurable in backend system (in SPRO). So, you need to tell what application it is and what you want to do for it. And then it might be good idea to ask this question from the corresponding application area instead of UWL. For example if you want to configure a travel expense approval application, you can ask the question possibly from HR/Travel area. Or maybe someone here in UWL area can help if I happen to know the application that you need to configure.
    Regards,
    Karri

  • Need to call sap transaction when the work item got rejected.

    Hi all,
    I need to call the ME22n transaction once i reject the Work item. Once i press the rejection button on the work item it should direct to the sap transaction. how can i make this functionality in the decision task. Do i need to implement an ext for this.
    Thanks.
    Neslin.

    You simply create a task for executing the SAP transaction (business object TSTC)
    you use this task as a dialog step at the rejected outcome of the user decision with the same agent as the user decision and in the details of the workflow step you tick the advance with dialog box.
    And... you're done.
    Kind regards, Rob Dielemans
    Edit: Instead of using BO TSTC it would be better to check the BO normally related to Me22n and see if a dialog maintain method exists
    Edited by: Rob Dielemans on Jul 16, 2009 9:55 AM

  • CopyListItem - creating a button in the ribbon and opening the new form with selecting item id data.

    Hi,
                In Sharepoint 2013 online without visual studio, I need to create a copy button in the ribbon and by selecting a listitem and clicking the copy button. A new form has to be displayed with
    the selected listitem data. Please help me in doing this scenario.
    Scenario:
                 Since Customer does not want to enter all the data once again. The customer will select a listitem and click the copy custom button in the ribbon, the data should be loaded in
    a new form. The customer will do little modification and will click the submit button to save as a new list item.  Please help me in doing this scenario
    Thanks
    Logesh

    Hello Logesh,
    You can use SharePoint designer workflow to achieve the above requirement.
    See the below link for more details.
    http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=223
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • He menu button of the ipod touch (4th generation) is not working and the service center of ipod is asking us to pay for the fixation of the said item even though it's still on warranty. this is the case number 215866894. And the service center said that t

    he menu button of the ipod touch (4th generation) is not working and the service center of ipod is asking us to pay for the fixation of the said item even though it's still on warranty. this is the case number 215866894. And the service center said that they don't cover that center part of the ipod so they're asking us money before they can fix it. We bought the ipod last december 8, 2010 and we brought it to the service center last april, 2011 here in the philippines. And until now they're not fixing it because they're asking us to pay half the price of the item which is 8,040 pesos..

    As advised, you need to call Apple about this.
    http://support.apple.com/kb/HE57
    No one here works for Apple (no one who will reply, anyway) so there's nothing anyone here can do to help you with this issue.
    Good luck.

  • How do I put strings, which I get during runtime, in a Ring-item? And how to open a Frontpanel of a SubVI by pushing a Button in the MainVI during runtime?

    I'm very new to LabVIEW and every day I learn such a lot about LabVIEW. I did not find any example according to my problem, but I don't know how to do the following :
    In the MainVI I read different strings from file in an array (In the example below I defined them as constants. The example only shows how the frontpanels should look like).
    During a loop I calculate different values, which will be written in an array, too, and in every loop the array of values will be overwritten with the new calculated values. (string[i] belongs to value[i])
    Now, by pushing the button 'sub' during runtime, I want to op
    en the Frontpanel of a SubVI, on which you see a Ring and a numeric Indicator. Now, I want to show the strings I read in the MainVI as items in the Ring-menu. If I choose one of the items (strings) in the Ring-menu during runtime, I want to show the accordant value, which was calculated in the MainVI, in the numeric Indicator, and in every loop the new calculated value should be shown in this Indicator automatically.
    So I have two questions:
    1. How do I put the strings into the Ring-menu during runtime?
    2. How to open a SubVI-Frontpanel during runtime, and how to pass the calculated values to it?
    Every answer I accept with thanks!
    Attachments:
    main.vi ‏29 KB
    sub.vi ‏9 KB

    See the atttached vis :
    1/ Pass the string array to the sub-vi, then use a property node to replace the ring node strings
    2a/ From the subvi front panel window, rightclick on the icon, and select "Show connector". Define the connections
    2b/Set the sub vi properties (right click on the vi icon, select "VI properties... >> Window appearance..." go to "customize...", and checkmark the "Show front panel when called" item).
    3/ your main vi should run 2 separate loops in order to avoid that reading the data stops the aquisition process (if any !..), or the reverse situation.
    You should read the LV manual to find out how to create a sub-vi : there are a number a basic things to learn and to memorize...
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    main.vi.zip ‏16 KB

  • In iPhoto '11 I cannot change the book settings. For example, adding page numbers. There is no "option" button as is suggested by the help item.

    In iPhoto '11 I cannot change the book settings. For example, adding page numbers. There is no "option" button as is suggested by the help item. How can I change to book settings?

    The "options" button should appear at the bottom of the iPhoto window, when you view your book, then the Book Settings Button should be available and you can activate page numbers.
    But remember, that the settings available will depend on the Book Theme you selected. The above shows the settings for one of the "Travel" themes. In a Picture Book Theme, e.g. you cannot add page numbers.
    What theme and book size are you using?
    Regards
    Léonie

  • Interactive Reports - Add Item/Button to the right of the Search Bar.

    Is there any way to put a button to the right of the Search Bar on an Interactive Report?
    Thanks,
    Dave

    Hi,
    Yes, if your button is not among region items.
    Go edit button and change Button Position to "Right of interactive report search bar" from select list
    Br, Jari

  • Enabling the save button when an unboud item is changed!

    hi!
    I HAVE a block wij an unbound item, this unbound item will contain
    the concatenation if 5 bound item, I use the post query trigger (block level) to
    concat theses 5 items in the unboud item, and in the when-validate item
    of the unbound item I subdivise the value by 5 and affect each one to the
    correspondant bound item....
    My question is : when I am in the unbound item and start to change it
    I need to have the save button enabled .......because the user need
    to say that he is changind somethig ....
    Thanks for any HELP!

    Hi,
    You can use set_item_property(.... in when validate_item trigger.
    ADinath Kamode

  • How to disable and hide the menu items of 'copy From' button of Goods Recei

    hi expert,
    I am new in SAP B1. so please help me.
    Q:How to disable and hide the menu items of 'copy From' button of Goods Receipt PO form?
    Regards
    sanoj

    Hi Sanoj,
    Try This.....
    If pVal.FormType = "143" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE And pVal.BeforeAction = False Then
                oform = sbo_application.Forms.GetFormByTypeAndCount(pVal.FormType, "1")
                Dim oitem As SAPbouiCOM.Item
                oitem = oform.Items.Item("10000330")
                'To Disable the button
                oitem.Enabled = False
                'To hide the button
                'oitem.Visible = False
            End If
    Thanks
    Shafi
    Edited by: shafi_sunshine on Sep 15, 2011 7:35 AM

Maybe you are looking for