ComboBox Manually setting to a particular Item

I have a ComboBox having the following Labels;
Label1
Label3
Label2
Label4
How to change the Label displayed in ComboBox from code. For example, Lets assume I have four button (Button1, Button2, ... ). On click of Button1, Label1 should be displayed in ComboBox, On click of button2, Label2 should be displayed in combobox and so on.

This code also shows how you can access the data field in the dataProvider.
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:Script>
    <![CDATA[
      import mx.collections.ArrayCollection;
      [Bindable] public var acTestHosts:ArrayCollection = new ArrayCollection([  
        {label:"Label1",data:1},
        {label:"Label2",data:2},
        {label:"Label3",data:3},
        {label:"Label4",data:4},
      private function clickFunc(event:MouseEvent):void{
        switch(event.currentTarget.label){
          case "Select Label1":
            cbx.selectedIndex = 0;
            break;
          case "Select Label2":
            cbx.selectedIndex = 1;
            break;
          case "Select Label3":
            cbx.selectedIndex = 2;
            break;
          case "Select Label4":
            cbx.selectedIndex = 3;
            break;
        txt.text = cbx.selectedItem.data;       
    ]]>
  </mx:Script>
  <mx:ComboBox id="cbx" dataProvider="{acTestHosts}"/>
  <mx:HBox>
    <mx:Button label="Select Label1" click="clickFunc(event);"/>
    <mx:Button label="Select Label2" click="clickFunc(event);"/>
    <mx:Button label="Select Label3" click="clickFunc(event);"/>
    <mx:Button label="Select Label4" click="clickFunc(event);"/>
  </mx:HBox>
  <mx:TextArea id="txt"/>
</mx:Application>

Similar Messages

  • Looking for the last item in a string set in a particular character style

    I should find each space that is the last character in a string set in a particular character style. For example, in the passage "123 456 789" (the underlined part here indicating a passage set in a particular character style), my ideal GREP search would yield a match after the digit 6.
    How do this?

    Excellent! This works perfectly. I have used your string with the bold character formatting, and replaced the matches with [nothing], set in None style.
    On second thought, I was surprised that it indeed had worked: why was the space replaced, and not deleted? Shouldn't I have used
    (?<!.)(\s)(?=\w)
    and replaced it with
    $2

  • Re:Query for Stock Statement for a particular item..!!!!

    Dear SAP Experts,
    I need a stock statement query  for a particular item which contains:
    1.ItemCode
    2.Item Description
    3.Item Price
    4.Opening
    5.Receipts
    6.Issues
    7.Closing
    8. Value
    The selection criteria are:
    1.Warehouse code
    2.Item Name
    3.Posting Date
    Plz give me a good solution for this issue.
    With Regards,
    Revathy

    Check this
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    set @FromDate =
        (Select min(S0.Docdate) from OINM S0 where S0.Docdate >='[%0]')
    set @ToDate =
        (Select max(S1.Docdate) from OINM S1 where S1.Docdate <='[%1]')
    select * from
        SELECT T0.itemcode,
        min(T0.Dscription) as 'Item Description',
        min(B1.ItmsGrpNam) as 'Item Group', W1.Whscode, C1.Location,
        (isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate ),0)-
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate),0)
        ) as [Opening Stock],
        isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate
            and O1.docdate<=@ToDate and O1.inqty>0
            and O1.transtype in (20,18)),0
        ) as [Purchase Quantity],
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate
            and O1.outqty>0 and O1.transtype in (21,19)),0
        ) as [Purchase Return Quantity],
       isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.outqty>0
            and O1.transtype in (13,15)),0
        ) as [sale Quatity],
        (isnull
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate<=@ToDate),0
            isnull((
                Select sum(isnull(outqty,0))
                from OINM O1
                where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
                and O1.docdate<=@ToDate),0)
        ) as [Closing Stock]
        FROM OINM T0
        INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
        INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode
        INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod
        INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode
        INNER JOIN OLCT C1 ON W1.Location=C1.Code
        Group by T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location
    ) a
    where (a.[Opening Stock]
            +a.[Purchase Quantity]
            + a.[Purchase Return Quantity]
            +a.[sale Quatity]+a.[Closing Stock]
           ) !=0
    Regards,
    Bala

  • How to restrict manual setting of User Status?

    Hi,
    I have created an User Profile where a particular User Status is "set" based on the Business Transaction "Release".
    However, we are also allowed to set this User Status manually without carrying out the Business Transaction "Release".
    How do I restrict manual setting of those User Statuses that are "set" based on a Business Transaction?
    Raj

    Pete,
    I did read that post. But it is about providing authorisation to set a Status for an User.
    The case I am referring is, an User Status is auto set by a Bus. Trans Release. But I am also permitted to set the status transition manually. This way, Users tend to skip Releasing the Service Order. This is affecting upstream processes.
    Is there a way where we can restrict manual setting of User Statuses that have to be normally auto set by Bus. Transactions?
    Raj

  • Manual PR block for MRP items

    Hi Buddies
    I would like to have the solution while taking my client requirements.
    The client wants controlling of Inventory budget. They have more MRP items which is creating the PR.
    But some of the users also processing the manual PR for MRP items. This is increasing the budget deduction. How to block the users for PR creation? I am not getting any Exits, BADI.
    Please share your knowledge
    Thenna

    Hi,
    It is not possible to avoid the Manual PR creation for MRP items. If the user has the authorization for ME51N transaction then he can able to create the PR manually.
    There is no restriction on this, unless if you block the authorization for ME51N for that users.
    You need to educate your users on this, Otherwise for some particular users who are doing this can be blocked for that transactions.
    rgds
    gsc

  • Workflow Start automatically for particular item of list

    Hi,
    I have created workflow using visual studio for custom list. My workflow type is manually start not start on Item create and change.
    I want to start workflow only when the start date of the custom list is same date of today. for this which steps I need to follow that run workflow in background and start workflow for particular item whose start date is satisfied with today's date?

    Hello,
    You need to create event receiver on (i.e. ItemAdded and ItemUpdated)that list to start WF via code when condition is satisfied. I had similar requirement in past and this is what i did.
    You may refer below link to see sample code:
    http://blog.mmasood.com/2012/06/programatically-start-workflow.html
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/75304724-f32f-466b-90d4-f4fdfe7f2bf7/start-workflow-programmatically
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Lock particular warehouse for particular item via code

    hi all,
    i need particular warehouse locked for particular item via code.
    i designed one form   header have item code and warehouse.
    when i press the add button warehouse locked for that particular item.
    Thanks & Regards
    Sudhir.B

    The answer is:
    Using the Items Object of the DI, set yourself to the correct line and set the locked property.
    for(i=0;i<oItem.WhsInfo.Count;i++)
         oItem.WhsInfo.SetCurrentLine(i);
         if(oItem.WhsInfo.WarehouseCode == "CodeOnTheForm")
              oItem.WhsInfo.Locked = SAPbobsCOM.BoYesNoEnum.tYES;

  • Individual serial number for a particular Item

    Hi,
    At reciept level when we are manually assigning Individual serial number for a particular Item in the serial entry Form (serial_entry Block).
    Manual process For 10 Quantity its ok, but is taking time for 1000 Quantity.
    Pls let us know if there any process to reduce manual activity to assigning Individual serial number for a particular Item in the serial entry Form (serial_entry Block).
    Thanx,

    You can receive by range.
    Enter the starting serial number, enter the qty and then Oracle will generate 1000 serial numbers automatically.
    See http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/po/connum.htm
    Hope this answers your question,
    Sandeep Gandhi

  • Want to block purchase accounting for particular ITEM GROUP? is it possible

    want to block purchase accounting for particular ITEM GROUP? is it possible

    Hi Sahil......
    That is not possible. You can not block purchase account for any case.
    It is standard and set at Company Level........
    Regards,
    Rahul

  • Manually Setting x- and y-offsets

    I work in the IT department for a health system and every night after the business office closes, we are the ones who print of the claims and bills. Right now we do this using a HP LaserJet 4300n because it allows us to manually set the x- and y-offsets of each drawer. This way we can line the pages up with the two different government forms we print on. Now, the LJ 4300n is a very old printer model and we're now playing Dr. Frankenstein and trying to create some monster that will at least continue printing, but we have a ton of issues because everything is so old and worn out. The problem is, we can't find any newer printers with the option of manually setting the x- and y-offsets for each drawer (individually) like you can with the LJ 4300n model. Does anyone know of any printer that will allow this type of configuration? If not a printer, maybe a software that allows me to set the offsets prior to printing? Keep in mind, we're printing text files from a medical application, so the software would have to modify the printer, not the file.

    I'd imagine that quite a few of the recent and current printer models intended for departmental use would include this degree of configuration. For example, from the User Guide manual for the LaserJet  Pro 300/400 M351/M451 models (these are colour, not monochrome devices):  My LaserJet  Pro 400 Colour MFP M475dn model (MFP equivalent of M451) does indeed have these items on the referenced menu (although they don't appear to be exposed via the equivalent Embedded Web Server interface).

  • How to create a sequence for an particular item in my apex form

    Hi friends,
    I created an database application, of a form with a report, and it is working fine...
    But in my form, i have a requirement....The below are the existing fields in my form
    issue no
    created by
    start date
    status
    priority
    due date
    Among these fields in my form i need to create a 'Sequence' for my field "issue no",
    So that whenever i opened the form the 'issue number' must generate automatically like 1 for the first time, 2 for the second time and so on..
    For that i created a sequence
    CREATE SEQUENCE "ORDERS_SEQ"
    MINVALUE 1
    MAXVALUE 999999999999999999999999999
    INCREMENT BY 1
    START WITH 1000
    NOCACHE
    NOCYCLE;
    But for validation where i need to write the sequence query for the particular item 'issue no'....i dont have any idea of where to write the validation query for the sequence..
    please tell where i need to write in step wise manner..please help me friends...
    As the below is my validated sequence query for item 'issue no'
    'select seq.issue_id.nextval into issue_no'
    This is my above validation query whether the query that i mentioned is right..if not let me know the validation query..
    And also i need where to apply this validation query in steps..
    Thanks in advance
    Regards,
    Harry...

    Harry,
    Rik is on the right track. Here is a sample insert trigger: Would need to substitute you sequence ORDERS_SEQ with my sequence las_log_seq, how you define or use timestamps is up to you.
    DROP TRIGGER LASDEV.BINS1_LAS_LOG_TBL;
    CREATE OR REPLACE TRIGGER LASDEV."BINS1_LAS_LOG_TBL"
       BEFORE INSERT
       ON las_log_tbl
       FOR EACH ROW
    BEGIN
       -- Description: Insert log_seq, creation_dt, creation_id,
       --              lst_updt_dt and lst_updt_id.
       -- Maintenance:
       -- Date        Actor          Action
       -- ====        =====          ======
       -- 07-Sep-2010 J. Wells       Create.
       :new.creation_id := nvl( v( 'app_user' ), user );
       :new.creation_dt := SYSDATE;
       :new.lst_updt_dt := :new.creation_dt;
       :new.lst_updt_id := :new.creation_id;
        SELECT las_log_seq.NEXTVAL
          INTO :new.las_log_seq
          FROM DUAL;
    END bins1_las_log_tbl;
    /Heff

  • Hide Particular Item Group from Selection Criteria of Sales Analysis Report

    Hello Experts,
    Is this possible to Hide Particular Item Group from Selection Criteria of Sales Analysis Report?
    I have one Item Group as 'Special Items'.
    Now, when I open  Item wise sales analysis report, I want to hide above mentioned group from selection criteria.
    Thanks in advance.
    Best Regards,
    Pankit Sheth

    Hi,
    1. Not possible to put validation for selection criteria windows.
    2. In standard, I don't think it is possible to hide only one item group.
    3. Alternatively don't give authorization to user for running sales reports. If still need create customized query and ask user run every month.
    Thanks & Regards,
    Nagarajan

  • Total of particular items of various open sales orders for particular cust

    HI.. following are my Items code  :
    2009,  8010, 8016, 9831, 27363, 27361, 27360, 27181, 16095.
    i want the report that consists of all items to be delivered to the customer. I  have created the following query :
    SELECT T0.CardName AS 'Dept_Name',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '2009') '2009',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8010') '8010',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8016') '8016',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '9831') '9831',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27363') '27363',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27361') '27361',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27360') '27360',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27181') '27181',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '16095') '16095'
    FROM ORDR T0
    but i want the total of particular items of various open sales orders for particular customer.
    pls improve the above query.
    thanks
    reema

    Hi,
    Try this
    SELECT T0.CardName AS 'Dept_Name',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '2009') '2009',
    (Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '2009') 'All 2009',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8010') '8010',
    (Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8010') 'All 8010',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8016') '8016',
    (Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '8016') 'All 8016',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '9831') '9831',
    (Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '9831') 'All 9831',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27363') '27363',
    (Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27363') 'All 27363',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27361') '27361',
    (Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27361') 'All 27361',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27360') '27360',
    (Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27360') 'All 27360',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27181') '27181',
    (Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '27181') 'All 27181',
    (Select SUM(isnull(T1.OpenQty,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '16095') '16095'
    (Select SUM(isnull(T1.Quantity,0)) from RDR1 T1 WHERE T1.DocEntry = T0.DocEntry AND T1.ItemCode = '16095') 'All 16095'
    FROM ORDR T0
    Regards,
    Bala

  • When creating a rectangle shap, how to manually set dimensions

    I am creating a rectangular shape with the tool (U).
    How can I manually set the dimensions (height and width).
    I know I can see the dimensions with the info button in the right side bar, bug I want to edit those values.
    Is this possible?

    You can set the dimensions before using the rectangle tool in the
    tool options bar (fixed size).
    Or you can change the dimensions after, by using the move tool or Edit<Free Transform Path
    and entering the dimensions in pixels (px) in the width and height boxes.
    MTSTUNER

  • If I have manually set "Start Time" and "Stop Time" for songs, and my hard drive is backed up in Time Machine, when files/songs are transferred on new hard drive, will my "Start Time" "Stop Time" options be there?

    My Macbook Pro will be going in for reimaging and my hard drive will be wiped, I want to know if all my iTunes preferences will be copied if I have backed them up on Time Machine. Specifically, if I have set certain "Start Time" and "Stop Time" for my songs, and I copy my iTunes library, will these "Start Time" and "Stop Time" options remain or will I have to manually set them one by one once again? I need a reply ASAP! Thanks so much!

    As far as I'm aware the start & stop times are stored in the library database, not the media files. If you backup/restore/transfer the whole library then the settings are included. If you create a complete copy of your iTunes folder on another drive you can connect to that copy by holding down option/alt as you start iTunes so you can check that everything is working properly before you send the Macbook away.
    tt2

Maybe you are looking for

  • Dialog Instance installation - Error u0093Service Not Started u0093

    Hi All, We are facing some issues while installing Dialog Instance on Windows 2003 server. Please help me on this... Below are the Central Instance Details: •     SAP Component Version: SAP NetWeaver 2004s •     Basis Release: 700 •     Kernel Releas

  • Main Menu in DVDSP3 Won't show background in simulation or burning disc

    I recently upgraded from a PowerBook G4 1.0Ghz and migrated to a Mac mini Intel. I am making a DVD for someone, and when i simulated it or burned a test DVD the main menu's background (video) would show up on the Powerbook, but now when i do the same

  • Copy pie chart to Indesign

    I need to copy pie charts created in Illustrator into an indesign doc. I've done it before. But now,  coopy/paste to Indesign doesn't work. What am I missing.

  • Get HTTP/1.1 409 Conflict when trying to accept invite into ical server on Lion

    Greetings, We have setup the iCal server on our lion servers and we just got an invite from a client and this is the error we get when trying to accept the invite. {HTTP/1.1 409 Conflict}  I think the invite came from an Outlook system but it is an .

  • Patch 16388307  Failling For The File xla120balcp.ldt

    Hi there, Please find below error which i have found during applying "Patch 16388307: CLARIFICATION AS PER BUG 15934260 - INVOICE MATCH TO PO FAILS WHEN PROJECT IS CLO" on test instance. FAILED: file xla120balcp.ldt on worker 1 for product xla userna