Using the same control appeal return of different tabs

Hello

I am fairly new to this bare with me for a second...

I have a situation were I use several tabs with the same exact command buttons in each of them.  Given that the buttons have the same function I want to use the same reminder.  I understand that each TAB is considered as an expert group and has its own Panel of handle.

My problem is I want the call to make the difference between the button OK of TAB1 and TAB2.  The handle Panel sent back, the call is (from what I can tell) the Panel handle for the tab which is great, but it doesn't have a constant right having at it in the header file.  How sure that TAB1 always has the Panel handle 2 and TAB2 has always handle Panel 3, etc...

Example: When I click on OK in TAB1 handle Panel sent to the btnOK is = 2 recall.  If I click OK in TAB2 is the handful of Panel = 3.  I want to move to the OK button, but do not want to use hard coded in full.

int CVICALLBACK btnOK (int command face, int, int event, void * callbackData, int eventData1, int eventData2)

{

switch (event)

{

case EVENT_COMMIT:

switch () {}

case 2:<----I don't="" want="" a="" number="" here="" but="" a="">

"do this."

case 3:

"do this."

};

}

return 0;

}

The easy solution would be to have a reminder for each of the buttons.  If it's the only way to go if it's what I'll do, but I am interested in what you think.

Thank you!

Hello

I see at least three ways to get what you want.

Solution A: depend on constant tab page name (as you can get it back by giving the handle from Panel)

In the callback, insert this code:

name char [64];

GetPanelAttribute (name of Panel, ATTR_CONSTANT_NAME),
If (! strcmp (name, PAGE1)) {}

Code for the first page of the tab

}

Else if (! strcmp (name, PAGE2)) {}

Code for the second tab page

}

... code additional pages

Solution B: based on the attributes of the tab

int parent, index;

GetPanelAttribute (Panel, ATT_PANEL_PARENT, & parent);

GetActiveTabPage (parent, PANEL_TAB, &index);)

switch (index) {}

case 0:

Code for the first page of the tab

break;

case 1:

Code for the second tab page

break;

... Add the code to additional pages

}

Solution c: use the callbackData for buttons

This solution requires code in two different program sections

* During the loading of the Panel with the tab control

int pnlH;

GetPanelHandleFromTabPage (Panel, PANEL_TAB, 0, &pnlH);)

SetCtrlAttribute (pnlH, PAGE1_BUTTON, ATTR_CALLBACK_DATA, (void *) 1);

GetPanelHandleFromTabPage (Panel, PANEL_TAB, 1, &pnlH);)

SetCtrlAttribute (pnlH, PAGE2_BUTTON, ATTR_CALLBACK_DATA, (void *) 2);

... and so on

* In the recall button

switch (callbackData (int)) {}

case 1:

Code for the first page of the tab

break;

case 2:

Code for the second tab page

break;

... Add the code to additional pages

}

Tags: NI Software

Similar Questions

  • using the same indicator of string in different stacked sequences

    Hi guys, I want to use the same string in different sequences stacked indicator. I tried to plug the output of each string constant through the sequence on my indicator chain outside the block in the sequence, but then I get an error "wire connected to a tunnel not channeled. What is the best way to use the same indicator for all sequences?

    Hi JoVMo,

    You can just use a local Variable of this indicator within the sequence...

    Kind regards

    Nitz...

    (Kudos are always welcome)

  • How to use the same user interface project for different HumanTask in GR 11, 1 material BPM

    When I set a user interaction activity in my process of material Oracle BPM 11 GR 1 and associate a human task with it. It generates a new project to contain all my forms. Anyone know if it is possible to use the same project for the different human task?

    After generating the UI for your first human task project, you can click with the right button on the project in JDeveloper and select 'New', click on the tab "Technologies all", then "JSF'-> ' ADF task based on human task workflow of." Then find the file your BPMN/composite project .task.

  • How to use a keyboard shortcut for text bold/underline instead of bookmarking/addition of grid using the same control keys?

    Hi people,

    I'm using Ctrl + B to "BOLD" text in my document; but he chooses randomly between the text in bold vs bookmarking page... it gets really annoying. How can I disable bookmarking page by using Ctrl + B? I'm trying just to bold text... I don't care about bookmarking

    I also try to highlight the text using Ctrl + U; He noted sometimes and other times, shows a grid on the page. How prevents having these contradictory effects by using the same command?

    S

    I use Windows 8.1, acrobat pro DC

    This happens when you use comment tools and simultaneously editing tools in the same session.

    Workaround: Do not use the comment tools when editing. Wrap with Assembly before moving to comment.

  • Use the same table queue send two different messages?

    Hello

    We have a reconciliation and an outgoing queue in our database!

    Now, we need to create another message content to send to IBM MQ series, so it's just an outgoing messages (no incoming message!)

    To the exsisting two queues, we have the gateway messages in place!

    I was wondering if I can use the same outgoing queue table and infrastructure Message gateway to send another message charge (contect) to the IBM MQ.

    Don't you think it's possible?

    More info made me know!

    Thanks a lot for your help!


    Hello Louis,.

    first of all I didn't detect something strange or even incorrect - perfect!

    Your questions:

    > 1. have I defind is correct? "multiple_consumers => TRUE);"

    Yes, that's correct. We must define this order to use MGW.

    > 2. I failed: gv_mq_inbound_log_queue: = 'ORACLE.002 ';     part because I have not all incoming messages to oracle, I just sent messages in my case! > Is this correct?

    Yes, that's also OK. Since you're carrying data from AQ to MQ in an outgoing queue. Incoming queue would be

    the other way around. You have configured your MQ as a remote queue (sys.mgw_property ('MQ_openOptions', 16')).

    You wishes to clarify this yet once with your MQ management group if this is correct. You may not know at this stage.

    The alternative would be a local queue (value = 2066).

    You don't show the part for the queue. This should be something like:

    BEGIN

    v_message_text: = p_message_text. GETCLOBVAL().    -using the XMLTYPE as payload type

    v_text_body: = SYS. MGW_TEXT_VALUE_T (NULL, v_message_text);

    v_payload: = SYS. MGW_BASIC_MSG_T (v_header, v_text_body, NULL);

    DBMS_AQ. ENQUEUE (queue_name-online p_queue_name,

    enqueue_options-online enqueue_options,

    message_properties-online message_properties,

    payload-online v_payload,

    -Online v_msgid msgid);

    > 3. The last of them, do you think I'll reach my goal with all these codes? Is that what you think may be missing or... ?

    Yes, you will reach your goal using this code. Try it and tell me what happened.

    Kind regards

    WoG

  • use the same style of type in different documents

    Hello

    I was exploring the character styles, and I feel that if you save a style to a particular file, you can use that style stored in another file, I am correct?

    I have many files and I want to use the same consistent style in each of them, that the best way to do it?

    Thank you!

    You can use load paragraph Styles (or Load all Styles) to copy your original document for new styles.

    You can also copy the style of text and paste it into the new document. If style names are not already named in the new document, the styles will come with the text. Be careful with this, however. If your new document includes the names of styles that match those that you paste in, the pasted text reformats the attributes defined in the new document.

  • I use the same URL in day after day tabs/windows, but am not ure if this version will restore all tabs on restart the computer every morning?

    I don't think I can give more info

    8 and 9 Firefox Firefox will allow me to continue with the same tabs from last session as in Firefox 3? :

    You're on Firefox 3.6.24 and if you ask if the new version 8.0.1 will do the same the answer would be Yes and it continues to be controlled by tools > Options > general > when Firefox starts: show my windows and tabs from last time.

    From Mozilla Firefox 4 (earlier this year), has presented app-tabs that you might want to listen to the video and read when standing up. Since you're using the same tabs they are probably in the same order, day after day after day, so just see the favicons on tabs and the model about whether something will not like order or missing.

    Since you use the tabs and windows as in earlier versions, the change will affect you probably even the least. But Mozilla has improved this which exists of sessions were closed, the windows and tabs via the menu ('Alt + H') history.

    What you probably will not tolerate changes to toolbars, based on studies of imperfect ergonomics (like Microsoft). You can fix it right and make the toolbars close to what you had before (instructions below).

    You can make Firefox 8.0.1 look to Firefox 3.6. *, see numbered 1-10 Articles of the topic following the interface user of difficulty Firefox toolbar, problems (make Firefox 4.0 through 9.0, resemble 3.6). If you make changes, you must be aware of what has changed and what it takes to use changed or missing features.

    It is much more beyond these first 10 steps in the list, if you want to make Firefox more functional.

    Please mark "resolved" a response that will better help others with a similar problem - hope it was her.

  • How to use the same fragment of page inside different taskflows in multiTaskFlow?

    Hi, I am using Jdev 12.1.3

    I have a View1 fragment of page inside 2 workflow: btf - task1.xml and btf - task2.xml.

    In this TaskFlows, I invoke the ExecuteWithParams method with different parameters (even the iterator).

    If I add this task empties into multitaskflow, then the data will be the same. I think that the problem in the same iterator.

    Can I use a page fragment in multitaskflow and get different data?

    Thank you, Alexa

    If you set the scope of data to "isolated", each instance BTF will separate db transaction control (different data)

    Dario

  • How to: using the same control panel for several vi and reproducing change to the control panel.

    I created a labview project that contains about 40 vi.  Each vi has a joint control panel which is a group of ip address, or address of the port and the parameters that are passed high-level vi at low level vi for the purpose of control and access our daq cards.  As this control panel exists in all the vi and must not be the same there is a problem when the need to make a change or update the controls during development.  The problem is how long it takes to go and change the control panel of each single vi.  I wish I had a way of reproducing a change in the Panel of control through all six simultaneously.

    All controls in the control panel are in a bundle, so all values are passed to 1 thread.

    I tried to turn the Panel in a sub vi and this way I can just "create control" and have output parameters maniuplate vi, but if I update the vi, I still have to go back and create a new control for each vi under the control has changed.

    I tried using secondary and the creation of the control panel in a sub vi which is displayed in the secondary, but gives the undesirable consequence of not being able to view or change the settings of the control panel if the program does not work, as pristine as when sub-panels program does not work.

    Is there a another way to display the front panel of a Subvi next using a panel of void?  Is there a better way to propagate changes in a bundle in a series of vi?

    Yes a def type might help you and I would take the next step to make a strict type def if you want the look to be the same on all its bodies. You can also view this nugget on Type definitions for more idea about it.

    Have fun

    Ben

  • How to use the same control between two forms of Visual Basic 6?

    I have two forms and must share text between two controls forms such that I get a value in the text box in Form-A should update the same value in the text box in Form-B...

    Is this possible? If so, how can I apply it in my project?
    I tried to create a control array, but that did not help.

    Hello

    I suggest you to ask your question in the Visual Basic forum: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/threads

    Thank you.

  • Is it possible to use the same file twice, but have different layers power when I use it?

    map.jpg

    I have this card and I want to have a zoom in the part that displays the residential street names, but of course I don't want the names of streets on the large version of the map. Without creating two different files can I activate these layers to the map zoomed in the corner and keep them to the enlarged map? Or is there a different way I should go about it?

    The reasoning to want a single file is because the streets and points of interest are evolving, it would be frustrating to manually change the street name of each file, as time passes and things could eventually be forgotten. Have a main file would eliminate errors or inconsistencies between two files.

    Card has been designed using InDesign in Illustrator and has.

    in indesign, make a right click on the image linked and select 'object layer Options.

  • How can I use the same graph of façade in several events in a structure of the event?

    I want to display my sensorDAQ signals in a graph.but I have more than one event in the case where the structure to acquire the signal and display it in the first round of graph.the is to acquire signals from threshold and its shown in the graphic as a feedback.after the first event is executed, I'll call the second event, where the other signals are acuired and compared with signals from threshold of event 1 my question is how can I use the same control on front panel in more than two events in the structure of the event? Please answer me I am stuck.

    Hello

    I have attached here an example of doing the same thing using local variables and shift registers. Take a peek inside. Shift register is always a better option than local variables.

    Kind regards

    Amine31

    (Bravo to give good answers, mark it as a solution if your problem is resolved)

  • Use the same script in different areas?

    Is it possible to use the same script in different areas?

    I had several scripts that will validate and modify the entries in the user on different areas. Since they do exactly the same thing, is it not possible to just get out the 'real' on a field script and refer to other fields to this script?

    Of course - we have a fragment of 'commonScriptObjects.xdp' that we all have

    our common methods of javascript in.  Then we add to the form and hide it.

    then use the following reference to point to the script object:

    GET A HANDLE TO THE SCRIPT OBJECT

    var commonScript =

    xfa.resolveNode ("commonScriptObjectsFrag.fragmentScript");

    CALL A JAVASCRIPT METHOD IN THE SCRIPT OBJECT

    commonScript.setupSearch ();

    Here's something else you can do to validate our mandatory fields.  We spend in

    the real to validate field and the name of the field as a text string:

    If (! commonScript.validateRequired (mainContentSubform.customerName,)

    False return 'Customer'));

    and the validateRequired method, which is in our commonScriptObject xdp

    file, looks like this:

    validate required fields

    function validateRequired (oField, fieldName) {}

    Console.println ("enter validateRequired");

    var commonScript =

    xfa.resolveNode ("commonScriptObjectsFrag.fragmentScript");

    If (commonScript.isNullValue (oField.rawValue))

    {

    xfa.host.messageBox ("Please fill out the '" + fieldName +)

    ("' field.", "Error", 3);

    xfa.host.setFocus (oField);

    Returns false;

    }

    Returns true;

    }

    Hope that helps,

    Elaine

    ocen12 [email protected]>

    29/07/2009 09:26

    Please respond to the

    [email protected]

    TO

    Amal [email protected]Schmitz >

    CC

    Object

    Use the same script in different areas?

    Is it possible to use the same script in different areas?

    I had several scripts that will validate and modify the entries in the user on

    different areas. Since they all do exactly the same thing, is not

    possible to just get out the 'real' on a field script and refer to the

    other areas of this script?

  • using the same search terms on ebay, getting different results on firefox exploer

    using the same words to search on ebay for internet explorer, I get results more when I use ebay on FireFox > is cutting some of the results when using Firefox

    It is always possible that eBay is to differentiate between browsers and gives different results, based on previous visits.
    You can try to delete cookies in two browsers to see if it has an impact.

    "Clear the Cache":

    • Firefox/tools > Options > advanced > network > content caching Web: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Firefox/tools > Options > privacy > "Use the custom settings for history" > Cookies: "show the Cookies".
  • Why the temperature shows on my watch always different temperature on the watch of my husband when they use the same application?

    Why the temperature still showing on my watch shows a different temperature than on my husband watch when they both use the same weather app?

    Hi Jodie

    If you are each using the weather app (which is included in the framework of the iOS and watchOS), the following steps can help (followed by each of you):

    • On your iPhone, in the weather app:
      • If using anything other than the current location (which is included by default), make sure you have each added to a common location / city.
      • To add another location, select the icon «+»
    • On your iPhone, in the application of the watch, go to: My Watch (tab) > weather > default City > make sure you have each selected at the same location (for example: place of current residence or Mount Laurel).
    • On your iPhone, go to: settings > privacy > location Services:
      • Ensure that the location service is enabled;
      • Make sure Apple Watch is face value while it helps;
      • Check that the weather is set to always;
    • On your iPhone, go to: settings > general > background App update:
      • Check that the bottom App Refresh is enabled.
      • It can also help to activate the setting for the weather.
    • For optimal performance of your watch, keep the Bluetooth and Wi - Fi enabled at all times on your iPhone:
      • iPhone: settings > Bluetooth - on.
      • iPhone: settings > Wi - Fi - on.

Maybe you are looking for