You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your demo if you use the default value of the last parameter of CarClock constructor (or set it to false) then the demo will throw a NullReferenceException on setting the Location property of CarClock.ClockPanel
The text was updated successfully, but these errors were encountered:
The reason for that exception is that if BaseBar is required (last parameter set to true)
the Clock will be contained inside a panel (ClockPanel) hence, you must use ClockPanel insted of Clock
if last parameter set to false, ClockPanel will never be initialized and you must use Clock. in the example I use the ClockPanel Location in order to set the GoalsClock location, so if AddBaseBar is set to false, use Clock location. for example:
' AddBaseBar = false
CarClock = New BusinessClocks.ExecutiveClocks.CarClock(300, 150, 0.8, False)
CarClock.ShowInnerCutForPerformance = False
CarClock.BarBackColor = Color.Pink
CarClock.Create(True)
Me.Controls.Add(CarClock.Clock) ' use Clock and not ClockPanel here
GoalsClock = New GoalsClock(200, 200, 0.8)
GoalsClock.Create(True)
GoalsClock.Clock.Location = New Point(0, CarClock.Clock.Location.Y + CarClock.Clock.Height + 5) ' you dont need to add the bar height: + CarClock.ClockPanel.Height + 5, replace with clock height in order to get the Y point of the bottom of the clock
Me.Controls.Add(GoalsClock.Clock)
I know it is confusing do you have a better solution rather than raising an exception?
In your demo if you use the default value of the last parameter of CarClock constructor (or set it to false) then the demo will throw a NullReferenceException on setting the Location property of CarClock.ClockPanel
The text was updated successfully, but these errors were encountered: