Dynamic vi on tab control

Hello,
              I have a tab.vi which has a tabcontrol. The tab control has 3 tabs. Only tab1 is visible intially and the other two tab's are hidden. Now lets say we are in tab1 and user presses 'Add' button. Then tab2 becomes visible. If user presses again 'Add' Button then tab3 becomes visible. Now each tab has a subpanel. Each subpanel will be loaded a vi from template when the respective tab becomes visible. Now Lets say tab1 and tab2 are visible then subpanel1 and subpanel2 will have a vi derived from template vi.
Template vi has two integer input and calculates the sum of it and gives the output.
Now coming to the problem:
User enters the following data
Tab1: Subpanel1 : Tab1Input1=5 Tab1Input2=10
Tab2: Subpanel2 : Tab1Input1=23 Tab1Input2=2
now the Tab1output indicator should dispaly 15
and Tab2output indicator should display 25
I am having problem getting the vi reference and traversing objects.
“Talk is cheap. Show me the code.”
― Linus Torvalds
Attachments:
AddTemplate.vi ‏10 KB
Tab4.vi ‏26 KB

If you intend to do that, you'd have to create the dynpro dynamically and generate it using the sentence GENERATE DYNPRO, otherwise you won't be able to place N fields dynamically in the screen. (However SAP does not recommend using this sentence in application programs)
Another option would be the use of OO ALVs instead of Table Controls, with this approach, you'll be able to generate N ALVs (one for each header) by splitting a screen container control in N predefined 'SubContainers' (You can use the CL_GUI_SPLITTER_CONTAINER component)

Similar Messages

  • Dynamic creation of tab control

    Hi,
    Am suppose to create table control for each header record in intenal table.
    ie-
    Header1
    Tab contrl 1
    header2
    Tab contrl 2
    header n
    Tab contrl n
    Though number of records in int table not fixed.
    can anybody please guide me how can this be achieved as for tab control we have to draw tab control container in screen painter first.
    Thanks,
    Sanjay Deshpande

    If you intend to do that, you'd have to create the dynpro dynamically and generate it using the sentence GENERATE DYNPRO, otherwise you won't be able to place N fields dynamically in the screen. (However SAP does not recommend using this sentence in application programs)
    Another option would be the use of OO ALVs instead of Table Controls, with this approach, you'll be able to generate N ALVs (one for each header) by splitting a screen container control in N predefined 'SubContainers' (You can use the CL_GUI_SPLITTER_CONTAINER component)

  • Dynamic event registrati​on wont work with Tab control

    In LTR volume 11 No1 we find the "Dynamic Event Handling.vi".
    I had placed the controls on a Tab control and now this example wont work.
    Is there a solution to this problem?
    Scientia est potentia!
    Attachments:
    Dynamic_Event_Registration.vi ‏51 KB
    Dynamic_Event_Registration(controls_on_Tab).vi ‏64 KB

    Yes. The first stage of the code registers mouse down events for all the controls. When you added a tab control that meant that a mouse down event was registered for the tab as well. So now when you click on an object on the tab LabVIEW must decide whether to fire the mouse down on the tab-event, or the mouse down on the object on the tab event...It goes for the first but since there is no description for the tab no dialog will be displayed. If you add a description for the tab you'll see that it fires the event with the tab and you get a dialog with the tab description.
    So - how to fix. Well, it's not that simple, one might think that to exclude the reference to the tab when you register the events would do the trick, but it rather seems that LV will always t
    hink mouse clicks are on the tab and not on the objects on the tab.
    The solution though is to get the references to the objects by reading the controls on page property of the tab control. So instead of reading the controls array from the front panel read the pages references of the tab and then the controls on page array from that and then register mouse down events on that array.
    MTO

  • Is it possible to programatically add tab pages on tab control

    Hi All,
    Is it possible to programatically add tab pages on tab control? If yes then how?
    Thanks & Regards,
    Shrinivas

    Doing this will require the use of VI server and methods and properties.  First, some questions:
    Is the number of pages you may need unbounded?
    Do you have a maximum number of pages you need to display at any one time?
    If the answers are no and yes, then you can create a tab control with the maximum number of pages you need, and hide or show the pages, as necessary. To hide or show pages, use the Pages property to get references to all the pages.  Use Index Array to select the page you want to show/hide, then use its Page Visible property to show and hide it.
    You can also get a lot more dynamic, if you number of pages you need to show at any one time is less than the total number of pages.  In this case, you will want dynamic page contents and tab name.  You can set the tab name by Page Label property of the page (right next to the Page Visible property).  You can make the content dynamic by using a subpanel as the only contents of the page.  You can find out about subpanels in the LabVIEW help or this post.
    You also need to ask yourself whether a tab interface is the best one for your application.  I have usually found that if I need to show and hide a lot of tabs, I would be better off with a subpanel for my content and a text or menu ring the select the content.  Tree controls also work nicely for selection.
    Good luck!  Let us know if you need more help.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Tab control and content

    on my main page i have a five tab control, and each tab has its own content. below the tab control and external to it is another region containing a dynamic page portlet. this region faithfully shows its contents when 4 of the 5 tabs are displayed. when the 5th tab is displayed, it is empty. i've cleared the cache numerous time with no effect.
    if anybody has any ideas please pass them on.
    thanks,
    curtis

    Try to ask advice at the MozillaZine Extension Development forum.
    * http://forums.mozillazine.org/viewforum.php?f=19
    You need to register at the MozillaZine forum site in order to post at that forum.

  • Tab control name editing

    In my application i am using tab control . 
    For that i want to programatically change tab names and i want to enable and disable a specific tab .
    In property i cant find this option and in discussion forums i could not able to open the vi mentioned in the link 
    http://forums.ni.com/t5/LabVIEW/Change-values-of-Tabs-on-Tab-Control/m-p/677900#M311358 
    What might be the problem .
    Thank you
    Raja
    Solved!
    Go to Solution.

    You are have your answer concerning enabling and disabling tabs. Concerning the first part of your question you can not dynamically change the names of tabs at runtime. The reason is that logically tabs are enumerated with the tab names being the enumerations. In other words the names aren't properties that you can change, they are part of the datatype.
    Now what you can do is use a combination of buttons and enabling/disabling controls to simulate the appearance of a tab control - which might not be a bad idea given the problems that tabs can cause.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Design a WPF Tab control similar to the Wpf Ribbon

    Hi,
      I have a requirement to show the list of tools similar to that of a Microsoft word's Ribbon, but then i find some limitations in the Wpf Ribbon i..e it can not be completely customised, for example- The Ribbon tab header's height has to be increased
    when selected as shown in the figure, but I couldn't  find any relevant solution to accomplish it, so I have decided to use the native Tab Control and make it look like a Ribbon bar as suggested by  Andy
    ONeill  
    Expected Ribbon Tab header Style(Done using native Tab Control)
       But the issue here is I'm not able to handle the resize behaviour of the Wpf tab control.. when the tab control is resized it has to arrange all the elements in the same way that the ribbon bar does
    on  Dynamic Resizing.. 
    can you help me building a Tab control with this feature...
    Thanks,
    Sai Kiran Reddy

    Thanks for your valuable reply Mr. Andy ONeill can you please tell me how to mimic the Dynamic
    Resizing behaviour of Ribbon bar using the WPF Tab Control.. 
    There is an awful lot of functionality in a ribbon.
    And it's pretty tricky to use.
    Personally, I usually go with a tabcontrol and then add functionality I need from there.
    Often two tabitems with horizontally arranged listviews are sufficient.
    You can see that approach in use in my article:
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    <TabControl HorizontalAlignment="Left" x:Name="CommandTab">
    <TabItem Header="Navigate" FontSize="10">
    <ListView ItemsSource="{Binding Views}" BorderBrush="Transparent" FontSize="12" FontWeight="Bold"
    ScrollViewer.CanContentScroll="False"
    >
    <ListView.ItemsPanel>
    <ItemsPanelTemplate>
    <StackPanel Orientation="Horizontal"></StackPanel>
    </ItemsPanelTemplate>
    </ListView.ItemsPanel>
    <ListView.ItemTemplate>
    <DataTemplate>
    <Button Command="{Binding Navigate}"
    BorderThickness="0" Height="32" Width="100"
    Background="{StaticResource LightBrightGradientBrush}"
    Foreground="{StaticResource DarkDullBrush}"
    >
    <TextBlock Text="{Binding ViewDisplay}"
    TextAlignment="Center"
    />
    </Button>
    </DataTemplate>
    </ListView.ItemTemplate>
    </ListView>
    </TabItem>
    <TabItem Header="Edit" x:Name="EditTabItem" FontSize="10">
    <ListView ItemsSource="{Binding Commands}" BorderBrush="Transparent" FontSize="12" FontWeight="Bold"
    ScrollViewer.CanContentScroll="False"
    >
    <ListView.ItemsPanel>
    <ItemsPanelTemplate>
    <StackPanel Orientation="Horizontal"/>
    </ItemsPanelTemplate>
    </ListView.ItemsPanel>
    <ListView.ItemTemplate>
    <DataTemplate>
    <Button Command="{Binding Send}"
    BorderThickness="0"
    Margin="0" Padding="0"
    >
    <Path Data="{Binding IconGeometry}" Stretch="Uniform"
    Style="{StaticResource PathOpacityStyle}"
    Fill="{StaticResource MidDullBrush}" Width="32" Height="32"/>
    <Button.ToolTip>
    <TextBlock Text="{Binding CommandDisplay}"/>
    </Button.ToolTip>
    </Button>
    </DataTemplate>
    </ListView.ItemTemplate>
    </ListView>
    </TabItem>
    </TabControl>
    By the way.
    I think if you really work at it you can customise the ribbon by re templating the thing.
    On one project I ran  that work and wrangling the riibbon generally turned out to pretty much eat up all the time of one of my guys though. 
    Hope that helps.
    Recent Technet articles:
    Property List Editing ;  
    Dynamic XAML

  • Bug in Tab Control when inserted into SubPanel

    Just would like to report about pretty old bug, which is still present in latest LabVIEW 2013 SP1 13.0.1f1.
    I would like to insert SubVI with Tab Control into SubPanel, something like this:
    When SubVI executed, then I will set it to Page 2:
    Now what I've got in my SubPanel:
    Page 2 is active, but selector is not actualized - still show me active Page 1. Fully inconsistent.
    Not sure if it was reported already or not, but needs to be fixed from my point of view.
    Attachments:
    main.llb ‏25 KB

    mikeporter wrote:
    But yet another problem with tab controls... 
    Seriously though, if you are already using a subpanel why complicate matters with a tab control?
    Dynamically swap VIs in and out of the subpanels to present the same user experience as there was with the tabs.
    You're right - there are many ways to workaround about this bug. For example, if I will use Property Node instead of terminal or local variable, then it will working properly.
    This contstruction with tab control in subpanel used in my settings dialog. I have modular plugin architecture, and some plugins may have settings, so they organised in the same way as LabVIEW Options dialog - listbox with installed plugins and subpanel, where according subvi from plugin is inserted. Mostly all plugins fit into my dialog (which is not resizible at this moment), but some modules have lot of settings - then they splitted into groups and the tab control is used (NI does this with vertical scrollbar, which is also not perfect).
    When user made changes in settings, then last opened page is saved - when this dialog opened next time, then user should see last page - this is why I need to set page programmatically.
    Really, I don't like to change whole architecture for workarounding bug in LabVIEW just for few modules. At this moment I using property node and it works for me.

  • Save the selected value from listbox with its respective tab control dropdown selcted values in another listbox

    Hi all,
    I am making a vi where I have to save the selected value from listbox with its respective tab control dropdown selcted values in another listbox.Whenever I select Item1 then the heading change and respective tab will open for that item.But Now I just want to save the selection and put it in another ListBox.SO that I can renmove or add according to my wish. Plz help me.
    Solved!
    Go to Solution.
    Attachments:
    my_vi.png ‏83 KB

    Hi, I successfully make the vi to insert itmes from listbox1 to listbox2.Whenever I select itmes 1 in listbox 1 it display same elected item in listbox2 , but it not appending the items in listbox2.Like If 1 is selected in listbox1 then 1 will display , next time after saving when I selct next item like 3 then in listbox 2, 1 is replaced by 3,it dont come in second row of listbox2.Hope I am able to explain.\
    Plz help me to resolve this.
    Attachments:
    listbox_update.vi ‏11 KB

  • How can I set the tab order of text box controls on each page of a tab control?

    I need to be able to select the tabbing order of individual controls on a single page of a tabbed control. How??

    In LV 6.1 an up you should be ablel to right click on the edge of the tab control when the tab-page in question is selected.
    The bttom selcetion in the pop-up is "Reoder controls in page..."
    selecting this option will switch editing modes to allow you to specify the ored, just like in a cluster.
    I seem to remeber in older versions you had to drag the tabable controls off the tab control, specify the tabbing oder and then drag them back on. The oldest version I have on this machine is 6.1 so that all I can speak for at the moment.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Can you print all the tab control's contents and include the tabs?

    We are trying to generate a report that includes the contents of a tab control (graphs, text).  Using the Append Control Image to Report.vi, we are only able to print out the active tab and the tab is cut off of the image. How can we generate reports that include all the tab pages and their contents and include the labeling tabs?
    Thanks in advance.
    Jim

    I do have a workaround for makinging the prints but it looks like some sort of cropped screensave that cuts off the tabs.  In my sample I was printing out 3 of the tab controls and you can see there are three by the cut off tabs.  Is there a setting to allow for more of the graph and its surroundings to be "captured"?
    Attachments:
    Document.pdf ‏53 KB
    Document (2).pdf ‏51 KB
    Document (3) (2).pdf ‏58 KB

  • How can I Create a exe file were a tab control on it work`s

    I have a VI with many controls and indicators,these are spread on a tab control.This tab control works with out any problems but if i create a exe file then the tab control is fixed. How can I create a exe file so that the tab control on it work´s ?"
    Attachments:
    project7.1.jpg ‏129 KB

    Make the tab control a control and not an indicator. If you want to write
    to it you need to create a local variable.
    "Carlos-R." wrote in message
    news:[email protected]..
    I have a VI with many controls and indicators,these are spread on a
    tab control.This tab control works with out any problems but if i
    create a exe file then the tab control is fixed. How can I create a
    exe file so that the tab control on it work´s ?"

  • How can I create a exe file with a tab control on it that work´s ?

    I have a VI with many controls and indicators,these are spread on a tab control.This tab control works with out any problems but if i create a exe file then the tab control is fixed. How can I create a exe file so that the tab control on it work´s ?

    I have made a new Posting with the same question but this time I added a screenshot of the VI.
    Attachments:
    project7.1.jpg ‏129 KB

  • Data Origin Types not filled in the tab "Control Data" of BP interface

    Hello experts,
    I have loaded the clients from ECC6.0 to CRM 4.0.
    Before I have loaded the clients I have maintained the data origin type for the BP in spro -> cross application components -> SAP Business Partner -> Business partner -> Basic settings -> Data Origin -> Maintain Data Origin Type.
    After I have done the load initial of clients, the field  "Data Origin" is empty in  the tab "Control Data" in BP interface. If I do F4 in the field appear the configuration that I did in spro appear.
    For this field will appear filled I'll need to do more configurations in spro?
    Best regards,
    Mary

    Hi Mary,
    The middleware does not fill this field in BP master data. You can maintain data origin type in SPRO, however the mBdoc does not use this customizing in order to fill this field.
    Please try to use the BADI CRM_DATAEXCHG_BADI in order to fill this field during master data download.
    It hope it helps.
    Regards,
    Gabriel Santana

  • Horizontal tabs when they are on the left side of tab control

    I have a tab control for a touch screen where I was going to use buttons along the left side to change tabs, and hide the tabs. However, I realized I can put the tabs on the left side of the tab control and remove my buttons all together. Only issue is, I would like them (along with their font) to be horizontal, not vertical as they are shown in my screenshot. Is there a way to change this?
    CLA, LabVIEW Versions 2010-2013
    Solved!
    Go to Solution.
    Attachments:
    touchscreen.PNG ‏118 KB

    It's a really poor design aspect of tab controls that the text is sideways when the tabs are on the left or right side.
    I've looked into it and found no way to re-orient the text.
    However you can put images on the tabs instead of text, and the images can be of text (correctly oriented of course).
    The attached code can be used to generate such a tab control.
    Attachments:
    Create_Good_Tab_2.llb ‏98 KB

Maybe you are looking for