0

Setting the selected list box control item from another list box

I have a list box control with 3 options. This control updates several different bar charts in my Axiom application. As the user scrolls to see the other bar charts, they don't see the list box control anymore. I copied the list box allowing them to change it in several different places as they scroll. However, if they scroll back up to a previous copy of that list box control, it won't show the same value. I tried setting the selected item of list box 1 from list box 2 but I didn't have luck with this. Has anyone done this where you could give me your scripting line?

 

Example: 

This works fine to get the selected value and use it to update a label:

if (selectedItems[0]=="% of time") LBL_ByPeriod.Text = "% of time By Period (672 hours)";

I don't know though how to do something like this:

public void LB_ChartAgg_OnSelectionChange(object sender, string[] selectedItems)

if (selectedItems[0]=="% of time") LB_ChartAgg2.selectedItems[0] = "% of time";

5 replies

null
    • smason
    • 2 yrs ago
    • Reported - view

    Hi James Wise

    Maybe you can make use of this app our developer created. In it, all 3 list boxes are synchronized.

      • wise_james
      • 2 yrs ago
      • Reported - view

      Thank you Steve Unfortunately when I try to open it gives me an error: 

      • smason
      • 2 yrs ago
      • Reported - view

      James Wise 

      That's odd. When you extract the file, you may need to rename it so it is AxiomApp2. Attaching files on the forum forces everything to lowercase for some odd reason. I don't know if that is causing the problem or not.

      Another alternative may be to create a new app and save it. Then copy all of the contents from this one into it.

      • wise_james
      • 2 yrs ago
      • Reported - view

      Steve Mason Thank you so much! It was the case thing that made the app not work. Also, the app gave me exactly what I needed!

      • smason
      • 2 yrs ago
      • Reported - view

      James Wise Good to hear!

Content aside

print this pagePrint this page
  • Status Answered
  • 2 yrs agoLast active
  • 5Replies
  • 89Views
  • 2 Following