Convert Data Binding from Club to Column2

Posts: 25
So I'm currently using two separate themes, one for "club" races, and the other for "teams". Both are the same except for the club/teams portion. The teams theme is calling a csv file to show the respective team names, and the other just calls the "club" data binding.

My question is this..
Can I just use one theme and have a checkbox (or something else) that is selected in the Controls for a person to use that would swap these (so to speak)? If so, would this need to be in a script or something else, and what would it look like?

Thanks as always!
Posts: 785
You can change bindings on the fly with a script. It is relatively simple but you need to know the syntax. There are a number of examples available in the ATVO Theme.

Easiest example is the Driver Compare scene where you can select additional info to show for the two drivers (car, teamname, club, speed, etc).

Slightly more complicated example when using it in Tickers are the HTicker or VTicker, or the Grid/Results. They all have dropdowns that can swap between many different bindings (gap, interval, laptimes, pitstop times, etc).
Posts: 25
Nick Thissen wrote:
You can change bindings on the fly with a script. It is relatively simple but you need to know the syntax. There are a number of examples available in the ATVO Theme.

Easiest example is the Driver Compare scene where you can select additional info to show for the two drivers (car, teamname, club, speed, etc).

Slightly more complicated example when using it in Tickers are the HTicker or VTicker, or the Grid/Results. They all have dropdowns that can swap between many different bindings (gap, interval, laptimes, pitstop times, etc).

Nick, you have mentioned this theme before. Can you look at this log file, as I have tried quite a few times to open and view it, but it always crashes.

Error: 8/5/2020 7:02:54 PM (UTC)
ATVO version: 1.29.12.0
Themes SDK version: 1.19.0.0
Theme version: none

Unhandled exception
System.NullReferenceException: Object reference not set to an instance of an object.
at ATVO.ThemeEditor.Utils.TreeViewUtils.ExpandAndContinue(TreeViewItem root, Object item, Action`1 action) in D:\Users\Nick\Documents\Programming\ATVO\Appgineer.in-TV-Overlay-for-iRacing\ATVO.ThemeEditor\Utils\TreeViewUtils.cs:line 0
at System.Windows.Controls.ItemContainerGenerator.SetStatus(GeneratorStatus value)
at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.StartAt(GeneratorPosition position, GeneratorDirection direction, Boolean allowStartAtRealizedItem)
at System.Windows.Controls.Panel.GenerateChildren()
at System.Windows.Controls.Panel.EnsureGenerator()
at System.Windows.Controls.Panel.get_InternalChildren()
at System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint)
at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint)
at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Control.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)