How is the callback control ID parameter determined?

The reason I ask is that I seem to be getting unexpected results in a control callback. I have a Table control, which is then duplicated (many times) in the same position as the original. I switch between them by setting the ATTR_VISIBLE attribute on just one at a time, but whichever one is presented on the GUI I always get the same control ID passed in the common callback - the ID is of the last one duplicated, even if it is not visible. I have a workaround, of course, since I know which one I have made visible: it's just that to have the correct callback ID would have been more convenient.
Just guessing, but it seems that CVI searches for any control whose XY coordinates match the position of the mouse, and ignores whether that control is visible or not. Surely not the best way to do it...
Mike
Solved!
Go to Solution.

According to my experience, when the callback responds to EVENT_COMMIT and EVENT_GOT_FOCUS events it receives the correct control ID even in case of overlapping controls; I never used EVENT_xxx_CLICK events in such a manner (which I suppose you are using since you are speaking of mouse coordinates) so I cannot tell anything for sure but in my opinion the system can respond returning the control ID of the topmost control (which is the last one created and seconds your observations). While I don't know if this is true and agree with you that an invisible control should not respond to any event, I can suggest you to add one simple SetCtrlAttribute instruction immediately after making visible one of the tables to make it the topmost control (I seem to remember that the related attribute is ATTR_ZPLANE_POSITION with a value of 0 to let it topmost but I cannot check at the moment; look in the online help for detailed documentation).
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?

Similar Messages

  • How does the ask-to-buy notification determine which organizer's device to send it to?  I keep receiving notifications on my ipad but not my iphone.  my ipad does not have a data plan so if i'm not on wireless, i don't receive any notifications.

    How does the Family Share ask-to-buy notification determine which organizer's device to send it to?  I keep receiving notifications on my iPad, but not on my iPhone.  My iPad does not have a data plan so if I'm not on wireless, I don't receive any notifications.

    Did you ever receive a solution for this issue?

  • SG Scene Detect is a NOP -- how do the sensitivity controls work?

    I have a four minute clip that produces a complete flatline in SG Scene Detect.
    My guess is that it may have something to do with the content: it is 8mm film partially digitized to HD (i.e. SG/SD is part of the process) so is letterboxed  on L/R... I'm thinking maybe all that black is driving the detector crazy.
    In any case, NONE of the documentation I can find gives any hint at all as to what the "sensitivity" controls do. Is there a document anywhere on this?
    What I see for controls:
    - Large arrow (and digits) that can be moved with mouse or shift-mouse (for speed). Default value 2.0
    - If the value is changed, a blank box shows up on lower right. It appears to reset the value.
    - A small square below the line appears to signify nothing, at least for now
    - Tooltip says "Press ctrl to toggle Gang" -- so there's a set of ganged controls somehow
    - The normal slider range is 1.25 to 4.0
    - If I go beyond those values high or low (even negative), two extra markers show below the line, and approach from both ends simultaneously toward the small box
    - Sliding left increases the number without limit (I dragged up to 35 billion). The two lines appear to touch the box at around +130
    - Sliding right decreases the number below zero also without limit. The two lines appear to touch the box at around -130
    Pressing 'ctrl' may toggle a Gang but I guess I'm not a Gang Member -- I can't see where the Gang is hiding out
    In any case. I'd love to know what these controls do. And I'd love to actually detect a scene in my clip!
    Thoughts?
    Pete

    Yes it is possible to secure the network so that only your family members should access the internet ......
    Open router set up page using http://192.168.1.1  ....you will see username & password screen .... leave username blank & in password use admin.....
    Click wireless ...change the network name to any non-linksys network name .... click save settings....
    Click on wireless security ..... use either WEP or WPA security level...... have a note of the key ..... click save settings ...
    On wireless computers once the wireless utilitied are configured to all computer .....only the configured computer will go online
    You can also check this link ......

  • How: Using the same control panel for multiple vi and propogatin​g changes to the control panel.

    I have created a labview project that contains about 40 vi.  Each vi has a control panel in common that is a group of ip address, or port address, and settings that are passed from high level vi to low level vi for the purposes of controlling and accessing our daq cards.  As this control panel exist in all vi's and is required to be identical there is a problem when needing make a change or update the controls during development.  The problem is how much time it takes to go and change every single vi's control panel.  I wish to have a way of propogating a change in the control panel across all vi simultaneously.
    All control in the control panel are in a bundle, so all values are passed in 1 wire. 
    I tried turning the control panel into a sub vi, and this way I can just "create control" and have outputs of the vi maniuplate settings, however if I update the vi, I still have to go back and create a new control for each vi as the control has changed.
    I have tried using the subpanel and creating the control panel in a sub vi that is displayed in the subpanel, but this gives the unwanted consequence of not being able to view or change settings on the control panel if the program is not running, as subpanels blank out when the program is not running.
    Is there another way to dispaly a subvi's front panel beside using a sub panel?  Is there a better way to propogate changes in a bundle throughout a series of vi? 
    JW
    Solved!
    Go to Solution.
    Attachments:
    Labjack Comm Settings.vi ‏15 KB

    Yes a type def would help you out and I'd take the next step to make it a strict type def if you want the appearence to be the same across all of its instances. You can also review this Nugget on Type definitions for more idea on this topic.
    Have fun,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How does the bacepanel control the control value of the front?

    I want to use a button as the control one in the front panel and use it as indicator one,I mean that the same button can be used as the controlor and the indicator!
    How can I do? Please tell me experts!Thanks

    Hi,
    If I understand correctly your question, you can do so:
    Make a control of your button. So you can press on it. In the diagram, create a local variable for this button. So you can modify the button value programatically.
    See attachment.
    I hope it will help you.
    Attachments:
    Toggle_control_button.vi ‏21 KB

  • How is the next repository sequence number determined?

    I'm in Fusion Middleware activating an RPD file that is sitting in a directory all by itself. When I click Apply, the name of the RPD file plus a sequence number, such as _BI014, is shown as the new repository name.
    Where does FMC look to determine that the last sequence number used was 13, so this one should be 14? Where is that little tidbit of information stored?

    Hi Mark,
    Refer to this article from Rittman, where he clearly explained what happens in the background upon clicking on Apply button:
    From the Article:
    "Apply button, to save the changes. At this point, the RPD gets a sequence number after it, and it’s displayed as the current default online repository for the Oracle BI Domain.
    So what’s gone on in the background to make this happen? When you press the Apply button, another MBean method gets called; this time, the uploadRepository method from the oracle.biee.admin:type=BIDomain.BIInstance.ServerConfiguration,biInstance=coreapplication, group=Service MBean.
    This MBean takes the two parameters that you entered into Enterprise Manager, or that you can enter directly into the MBean Browser yourself:
    When you call then method, it reads the value of the DataZipFileVersion attribute within the oracle.biee.local:Location=bi_server1,type=DomainConfigProxy,group=Config MBean, and increments it by one, to get the sequence number it appends to the RPD file name.
    Once the uploadRepository method is called, you can see the name of the uploaded repository in the MBean’s Repository Name attribute"
    Reference: http://www.rittmanmead.com/2011/03/so-how-does-enterprise-manager-work-within-obiee-11g/
    Thanks,
    -Amith.

  • How can the volume control code be reset if unknown on an ipod 2GB?

    ipod   Windows XP Pro  

    To reset screen-lock passcode:
    Connect the iOS device to your computer and restore via iTunes. Place the iOS device in Recovery Mode if necessary to allow the restore.
    If recovery mode does not work try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    To sell an iPod first go to Settings>General>Reset>Erase all content and settings. As it says the iPod is erased, all content and association with your account is erased.

  • How is the e-mail body text determined when e-mail sent from PO in edit mod

    We have an e-mail that is sent to the supplier when the buyer edits the po then goes to header-output - create and send immediately.   We want to remove the SAP default Salutation
    Best Regards,
    Your Purchasing Company
    The problem is we cannot find where this e-mail body is being created.   Any ideas?
    Sandra

    Hello,
    The email body text that you get at SOST is from the cover form BBP_OUTPUT_COVER.
    When you Order a PO, the following is the text is seen in SOST.
    "&LV_TITLE&
    Please find enclosed the purchase order &IV_PO_HEADER-OBJECT_ID& &IV_PO_
    Kind regards,
    Your purchasing company"
    You can create your own cover form in order to substitute the standard BBP_OUTPUT_COVER.
    Regards,
    Ricardo

  • How does the ZCM11 control or block 3.5G Card ?

    Hi All
    in my country, much people use 3.5G for mobile access. but the 3.5G will cause many security issue. Does the ZCM11 could complete block 3.5G card work ? besides 3.5G...like Wimax or LTE...Do these devices also block or maybe in the future ?
    wyldkao

    Originally Posted by wyldkao
    Hi All
    in my country, much people use 3.5G for mobile access. but the 3.5G will cause many security issue. Does the ZCM11 could complete block 3.5G card work ? besides 3.5G...like Wimax or LTE...Do these devices also block or maybe in the future ?
    wyldkao
    The ZCM "beta" forum is the right place to ask this question: ZENworks Community Builds
    But I think this could be done with a USB Connectivity Policy and/or with Communication Hardware Policy...
    Take a look at the ZCM 11 Endpoint Security beta documentation here: Novell Doc: ZENworks 11 Endpoint Security Policies Reference - Creating Security Policies
    Thomas

  • How does the ByDesign Control user's rights?

    Hi experts:
                   When i log on my system, "Customer" for example, i only can see five customers.However, when i develop my projects with ByDesign Studio.I can show all the customers(It contains the information of the customers which i have no rights to see) through the method :Raise message.
    Can somebody tell me why?

    Hi
    For a user with PDI Developer Rights, there are no restrictions applied. This is the default behavior.
    Regards
    Harish

  • How does the .h file macro map to CVICALLBACK control parameter?

    I created 8 command buttons and created same callback for all the buttons. Also have a 2x4 array initialized to value of 1. When user clicks any button the 2x4 array value should change to 0 (as command button does not change value to 1 when selected). In order to fill the array I thought of using control from CVICALLBACK. 
    int ctr_btns[2][4] = {{1,1,1,1},
                                            {1,1,1,1}};
    int CVICALLBACK Button_cb (int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2)
      int row = -1;
        int val = 1;
    switch (event)
    case EVENT_COMMIT:
                         GetCtrlVal (panelHandle, control, &val);
                          if(control >= 2 && control <= 5)
                                    row = 0;
                          else if(control >= 6 && control <= 9)
                                       row = 1;
                          else if(control >= 10 && control <= 13)
                                        row = 2;
                           else
                                         row = 3;
                            ctr_btns[row][control] = val;
                       break;
    The issue is that even after I changed the #define value of the control in .h file, it does not uses the defined value. Where is the control parameter value coming from?
    TIA.
    CLD,CTD
    Solved!
    Go to Solution.

    Hi, this is a common isue that has been discussed several times on the forums and does not have a fast response.
    First of all, you should not modify the include file associated to the UIR file, as stated on top of it, since the system automatically regenerates it every time it saves the UIR. Additionally, the ID assigned to the controls depends on the tab order you define on the panel, so it is subject to change. FYI, this is a discussion on this subject that you may want to read: as you can see, it originates from a question very similar to yours.
    Despite what I have said, control IDs actually can be used to discriminate between controls, so in your situation, and provided the buttons are assigned a progressive ID with the tab editor (Ctrl+T on the panel and assign the IDs clicking on the controls), your code could be rewritten this way:
    if(control >= PANEL_BUTTON1 && control <= PANEL_BUTTON4)
    row = 0;
    else if(control >= PANEL_BUTTON5 && control <= PANEL_BUTTON8)
    row = 1;
    else if(control >= PANEL_BUTTON9 && control <= PANEL_BUTTON12)
    row = 2;
    else
    row = 3;
    For the same reason, you cannot use 'control' as an index on the array, as you have no possibility to foreseen the ID value. That is, even if rewritten the way I told you, that code is not likely to work...
    In my opinion the correct way of discriminating between controls is to add a switch inside the callback:
    switch (control) {
    case PANEL_BUTTON1: ctr_btns[0][0] = 1; break;
    case PANEL_BUTTON2: ctr_btns[0][1] = 1; break;
    case PANEL_BUTTON5: ctr_btns[1][0] = 1; break;
    ( but you should create a 4x4 array of values).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How can labview update the string control (text-edit box) after we have pressed the carriage return key on the keyboard during text-editing within that box?

    Dear readers,
    I have been trying to work out how to get labview to detect the event when a 'string' control has been modified, where the user has finished editing the string either by 1) pressing the enter key on the keyboard, or by 2) taking the focus away from the string control again. For example.. if I use the mouse to click on the string control and then I type 1234 into the box, I would like to have a routine that does something once the user hits the Enter key of the keyboard, or when the user takes the focus away from the string control again by clicking on something else. I would like the routine to respond even when the user didn't change anything in the text box (such as when we mouse-click on the edit box to go into edit mode, and then mouse-click on something else to remove the focus with no changes to the contents in edit-box).
    The purpose of my routine is to have a edit-box for a user to change for example the centre-frequency of a vector network analyser, so that the centre-frequency of the network analyser can change once the user finishes entering a new value in the text-edit box by hitting Enter key after the number is keyed in. Even if the user has clicked on the edit box, but changes their mind by mouse-clicking on something else to remove focus from the edit box, I would still like labview to detect the event when the control loses focus, so that the centre frequency can be updated anyway (to the same value that was already in the edit box).
    So far, I've tried set the string control option to 'limit to single line', so that I can try to scan for a carriage return .. '\n' ... pattern in the string. Unfortunately this doesn't work because labview doesn't seem to attach the '\n' to the end of that single line.
    Could someone please suggest ways to set a flag when a user hits Enter during text-edit mode of a string control, or when focus has been removed from the string control?
    While I've only described my problem for controlling a single control parameter on the gpib device, I'd like to make this feature work so that I can do the same kind of thing with other control parameters as well.
    Thanks so much in advance.
    Kenny

    Hi Kenny,
    instead of using the event structure, you can directly achieve to what you want by the KeyFocus property of the string control.
    - Enable Limit to single line option
    - Create the property KeyFocus in read mode and connect an indicator
    Each time you click on the string to modify it KeyFocus is True; when you click away or hit Enter KeyFocus is False.
    You can toggle your settings when KeyFocus changes from True to False.
    Alberto

  • How to handle the table control in bapi?

    how to handle the table control in bapi? example va01.
    i pass multiple line item what is the procedure?
    header detail same .
    eample ship to party
           sale to party.
    line item mulptiple
    10 mat1
    2o mat2
    30 mat3.
    in bapi we can pass sinle line item.
    any way to handle multiple line item pass through the bapi.
    Message was edited by:
            Karthikeyan Pandurangan

    BAPI is not going through the screen flow logic so you need not to worry about the table control. Just check in the BAPi there must be one table parameter for line items just pass one int table with your data to that table parameter it will automatically update the tables.
    Regards
    shiba dutta

  • How to change the width of dropdown parameter's in BI Publisher

    Hi,
    Can you please tell me how to change the width of dropdown parameter's in BI Publisher

    Kirk,
    In the <rw:graph> tag, just add the standard HTML properties of width="xxx" and height="xxx" to control the width and height of the image. BTW, the graph tag is in the on-line help, although not in the index. You can find it by doing a search for "rw:graph".
    regards,
    Stewart

  • Problem passing a table parameter in rfc call using the function control

    I try to pass a Table as parameter to a Function Module using the SAP.Functions library (part of SAP frontend controls) from a Visual Basic (VBA) program.
    The function module has been verified to work when invoked from SAP FrontEnd Function Builder.
    The SAP RFC Control is created with
    Set sapFunctions=CreateObject("SAP.Functions")
    Following code snippet shows how I attempt to set exports and add a table row before calling the function module:
    sapFunctions.Connection = sapConnection
    Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
    With sapMaterialUpd
    <i>'set exports</i>
         .Exports("PA_GLPUPDLEVEL") = "S"
         .Exports("PA_VKORG") = "FI14"
    <i>'append table row</i>
         .Tables("IT_SALES_DATA_UPD").AppendRow
         .Tables("IT_SALES_DATA_UPD")(1, "VKORG") = "FI14"
         .Tables("IT_SALES_DATA_UPD")(1, "MATNR") = "W_3100"
         .Tables("IT_SALES_DATA_UPD")(1, "DATBI") = "99991231"
         .Tables("IT_SALES_DATA_UPD")(1, "DATAB") = "20041231"
         .Tables("IT_SALES_DATA_UPD")(1, "KBETR") = "2222"
         .Tables("IT_SALES_DATA_UPD")(1, "KONWA") = "EUR"
    End With
    <i>'call the function module</i>
    If sapMaterialUpd.Call() = True Then
        <i>'do something with the return tables here...</i>Else
        Debug.Print sapMaterialUpd.Exception
    End If
    The Call() returns <b>FALSE</b> and the exception is <b>"SYSTEM_FAILURE"</b>. The connection also resets.
    The local logfile that the control generates shows that an exception occurs at the point of the call:
    <i>10.02.2005  17:54:20.766 Packing Parameters for Z_SD_BAPI_SALES_DATA_UPD
    Packing Parameter PA_GLPUPDLEVEL.
    Packing Parameter PA_VKORG.
    Packing Table 0.
    Packing Table 1.
      10.02.2005  17:54:20.766 *** Calling  RFC Function 'Z_SD_BAPI_SALES_DATA_UPD'
      10.02.2005  17:54:20.986 RFC CALL status = RFC_SYS_EXCEPTION
      10.02.2005  17:54:20.986 RFC Error: RFC_IO27
      -Status:CODE=CM_DEALLOCATED_NORMAL STATUS=CM_NO_STATUS_RECEIVED DATA=CM_COMPLETE_DATA_RECEIVED ID=69415076
      -Message:connection closed
      -Internal Status:IO HANDLE=23 DRV=EXT LINE=1420 CODE=27 : GET ID=ffff LINE=861 CODE=7
      10.02.2005  17:54:20.986 Function call finished.</i>
    Seen next code snippet. If the Table object is not touched, the function call goes through without any problems:
    sapFunctions.Connection = sapConnection
    Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
    With sapMaterialUpd
    'set exports
        .Exports("PA_GLPUPDLEVEL") = "S"
        .Exports("PA_VKORG") = "FI14"
        'do <b>not</b> append a table row, for testing only ;-)</b>
    End With
    <i>'call the function module</i>
    If sapMaterialUpd.Call() = True Then
    <i>    'do something with the return tables here...</i>
    Else
        Debug.Print sapMaterialUpd.Exception
    End If
    This code works perfectly when calling the function. It returns TRUE and behaves normally. The function module returns descriptive response text in a table telling that the table was empty, according to the BAPI implementation.
    So is there something special needed here <i>after</i> appending the table row and <i>before</i> making the Call to properly attach the table as a parameter for the function module?
    Can this be a bug in the SAP RFC Control? The version of the wdtfuncs.ocx is 6206.6.45.54.
    Any hints are welcome!

    hi All partner,
    who solved this problem , I meet it too and
    can't clear it.
    SAPfunc := sapfunctions1.Add('z_get_sfcs_dn_mo');    
    SAPitab := sapfunc.tables.item ('I_DNMO');
    SAPitab.appendrow;                                       SAPitab.value(1,'MANDT') := '220'; 
    SAPitab.Value(1,'VBELN') := '2150000001';
    SAPitab.Value(1,'POSNR') := '50';
    SAPitab.value(1,'MATNR') := '19-99999-00'; 
    SAPitab.value(1,'AUFNR') := '921241512001';
    SAPitab.value(1,'DEDAT') := '2005/09/09';
    SAPitab.value(1,'LFIMG') := '100';  
    IF  SAPfunc.call = true then
      begin
      end
    else
        begin
        showmessage('call fail!!') ;
        end;
    end;
    RFC source code as below
    FUNCTION z_get_sfcs_dn_mo.
    ""Local interface:
    *"  TABLES
    *"      I_DNMO STRUCTURE  ZDN_MO
      data: wa type zdn_mo.
      LOOP AT i_dnmo.
        wa-mandt = i_dnmo-mandt.
        wa-vbeln = i_dnmo-vbeln.
        wa-posnr = i_dnmo-posnr.
        wa-matnr = i_dnmo-matnr.
        wa-aufnr = i_dnmo-aufnr.
        wa-dedat = i_dnmo-dedat.
        wa-lfimg = i_dnmo-lfimg.
       modify  zdn_mo from wa.
        insert into zdn_mo values wa.  --dump at here
        commit work.
      ENDLOOP.
    T/C: ST22 error message say at
      insert into zdn_mo values wa. ---dump at here
    the sapfunc.call returns fail.
    Message was edited by: jorry wang

Maybe you are looking for

  • My husband and i use the same appleid

    my husband and i use the same appleid but now when he gets an imessage on his ipad i also get it on my iphone. Do I need to create a new apple id with my own email address

  • Copy iMessages from Mavericks to Yosemite?

    Hi all: I just did a clean install of Yosemite, looking to copy my iMessages history from my Mavericks system over. I tried copying the contents of ~/Messages over, but once I launch Messages, I it says "Messages is updating... The Messages database

  • Yet another MacBook Pro touchpad driver support thread (regarding KDE)

    Hi I recently bought a MBP Retina 13" Late 2013, just because this masterpiece of hardware has the best price-performance ratio in this price segment. OS X sucks, because developing on it in a scientific way is a pain. GTest with c++11 problems, curi

  • One cable to TV from iMac 2009

    Is there a cable that combines all I need to go from an early 2009 iMac to an Hdmi Cable which would go to my TV? Thanks

  • Mac G5 + Dell Monitor

    Hi, I have a G5 and tried hooking my Dell 2407WFP monitor to it & the font is extremely fuzzy. This is especially true in programs like Quark. I have it at the highest resolution w/ font smoothing set for flat screen (although I tried every setting)