【问题标题】:Teechart axis title图表轴标题
【发布时间】:2013-06-06 00:17:22
【问题描述】:

我有一个 Delphi 图表应用程序,我希望用户从下拉菜单(组合框)中选择他们想要的图表,这很好。

我希望能够将图表 x 轴(底轴)标题更改为组合框中文本的标题,但我似乎无法让它工作。

这是我用过但不起作用的代码:

DBChart1.Axes.Bottom.Title.Text := 'Queue: ' + ComboBox1.Selected.Text;

我正在使用 TeeChart 中的 TDBChart 将我的数据从数据库映射到图表。

错误信息如下:

[dcc32 Error] charts.pas(56): E2003 Undeclared identifier: 'Text'
[dcc32 Fatal Error] Project2.dpr(5): F2063 Could not compile used unit 'charts.pas'

【问题讨论】:

  • ComboBox1.Selected.Text --> 我想应该是:ComboBox1.Text。

标签: delphi teechart


【解决方案1】:

您需要的属性名为Caption,而不是Text。

DBChart1.Axes.Bottom.Title.Caption := ...

还请注意,问题中写的作业的右侧也是不正确的。你大概的意思是阅读ComboBox1.Text。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-06-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多