Page 1 of 1
CustomAxis
Posted: Mon May 12, 2008 4:41 pm
by 15047998
Any idea why I cannot read the maximum value from a custom axis??
Hugh
Posted: Tue May 13, 2008 11:43 am
by narcis
Hi Hugh,
You may be making the Maximum call before the chart is painted and therefore axes properties calculated. Code below works fine for me. Using InternalRepaint call I'm forcint the chart being internally repainted so that axes have valid properties when retrieving them.
Code: Select all
Private Sub Form_Load()
TChart1.Environment.InternalRepaint
Me.Caption = CStr(TChart1.Axis.Custom(0).Maximum)
End Sub
Posted: Tue May 13, 2008 12:42 pm
by 15047998
Hi Narcis,
I'm developing in Labview - using the internal repaint functionality as suggested creates me an "access violation at adress 010B0E16 in module Labview.exe - read of address 61745320" - so this solution does not work for me - any other suggestions??
anyway - using the internal repaint every time on an OnAxisDrawLabel creates unneccesary high computation load - should the repaint not be done internally once when an axis label changes - I dont understand this logic..... why cant they do it the same way they do it with top, bottom, left and right axis.......
thanks,
Hugh