如何在Visual Basic窗体中使ScrollBar在图表上可见

时间:2015-08-19 14:02:37

标签: vba visual-studio-2010 charts

我有一张需要ScrollBar的图表。有趣的是ScrollBar就在那里,但它不可见。我可以在图表的底部与它进行交互,它的功能正常。它只是不可见。无论如何这里有一些代码......

'ch is the Chart
    With ch.ChartAreas(0)
        With .AxisX
            .Minimum = chartMin
            .Maximum = chartMax
            .Interval = 1
            .ScaleView.Size = chartRows
            .ScaleView.Position = chartMax
            With .ScrollBar
                .Size = 20
                .ButtonStyle = ScrollBarButtonStyles.SmallScroll
                .IsPositionedInside = True
                .Enabled = True
                .BackColor = Color.LightGray
                .ButtonColor = Color.Gray
            End With
        End With
        .RecalculateAxesScale()
    End With

1 个答案:

答案 0 :(得分:0)

在未显示的代码中,x轴被禁用。 仍然没有解释为什么我可以与一个看不见的滚动条进行交互但它现在正在工作。

相关问题