Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
230
Scales - setting at run time
posted

I'm developing a Vb app and have added an UltraGauge to my form. On the designed, I set the axis value to 0 - 80 and all is well.

My problem is that I need that to change based on the data displayed. The axis maybe 0-80 for one display but on a different display - based on various factors - I want that change to 0-240. When I key in my gauge control name, I do not see a property "scales" anywhere...and therefore can't set the axis as I would like at run time. In looking through the designer, I would expect to be able to say mygauge.dial.scales() or something along those lines to set the desired range.

I've review a few posts for similar questions, but they all operate the same as far as setting the axis and then applying that to the scales collect for the guage...but I don't see a "scales" collection.

Any help or direction would be appreciated.

Thanks!

Parents
No Data
Reply
  • 230
    posted

    Looking at a few other posts...here's the code added to get it to work:

     

    Dim numericAxis1 As New NumericAxis()

    numericAxis1.EndValue = oITR.EstHours

    numericAxis1.TickmarkInterval = oITR.EstHours / 10

    Dim mygauge As New RadialGauge

    mygauge = ugagHours.Gauges(0) 'Control on the form

    mygauge.Scales(0).Axis = numericAxis1

Children
No Data