0
$\begingroup$

This question already has an answer here:

I have a number of different tabs on my 'dashboard'. Each tab has a few different Controls (drop down boxes) that the user makes selections with. These selections determine what is displayed on the tab in question. The controls, data, graphs etc are all known by seperate names so no control on one tab drives changes on another.

My problem is that when I use these drop down controls the entire display jumps back to the default page for the TabView. I think this has something to do with := set delay or Dynamic but I can't work it out.

The data comes from -

MOYGraphData := Select[Part[MonthlyFuel, 2 ;;, ;;], #[[4]] == DropDownGeneratorSelection && #[[1]] == DropDownYearSelection && #[[3]] == 0 &]; 

MOYGraphData1a := Partition[Riffle[Part[MOYGraphData, ;; , 2], Part[MOYGraphData, ;; , ColInDataM]], 2];

MOYGraphData2a := Partition[ Riffle[Part[MOYGraphData, ;; , 2], Part[MOYGraphData, ;; , ColInDataBaselineM]], 2];

Below is how I display it-

MOYGraph := ListLinePlot[Sort[{MOYGraphData1, MOYGraphData2}], PlotMarkers -> Automatic, PlotRange -> {{1, 12}, Automatic}, AxesOrigin -> {1, Automatic}, Ticks -> {Range[1, 12], Automatic}, PlotLabel -> "Monthly View", AxesLabel -> {"Month", YaxisTab2}, AspectRatio -> 1/11, ImageSize -> {1200, 150}]

Tab2 := Column[{Grid[{{YearHead, GenHead, MetricHead(, ChartHead)}, {DropDownYear, DropDownGenerator, DropDownMetric(, DropDownChartType)}}], Column[{HeadingTab2, MOYGraph, Column[{WeekHead, DropDownWeek, WOYGraph}], DOMGraph, Row[{GeneratorTotalWOYFuelVar, GeneratorWOYTotalFuelCons}, Alignment -> Left]}, Alignment -> Center]}, Alignment -> Left];

Dashboard := TabView[{"Introduction" -> IntroPage, "Fuel & Energy" -> Tab2, "Generator Loading" -> Tab3, "Generator Comparison" -> " ", "Data Exclusions" -> " "}, 2];

Dynamic[Dashboard]
$\endgroup$

marked as duplicate by Mike Honeychurch, m_goldberg, Verbeia Feb 27 '13 at 5:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    $\begingroup$ Please post an example of code that displays this problem. I have a hunch about what it might be, but it's hard to tell without seeing some code. $\endgroup$ – jVincent Jan 8 '13 at 12:31
  • $\begingroup$ I have voted to close this duplicate rather than the more recent question because the more recent one has an answer and comments. $\endgroup$ – Mike Honeychurch Feb 26 '13 at 21:31