-3

有没有办法TDBNavigator在 C++ builder 中为按钮添加标题?

4

2 回答 2

2

这将允许您为 c++ builder 中的每个按钮添加标题

char *btntext[11] = {"First","Prior","Next","Last","Insert","Delete","Edit","Post","Cancel","Refresh","Apply"};
for(int x = 0; x < nav->ComponentCount; ++x)
    {
    TNavButton* navbutton = dynamic_cast<TNavButton *>( nav->Components[ x ] );
    if( navbutton )
        {
        navbutton->Font->Name = "Arial";
        navbutton->Font->Size = 8;
        navbutton->Caption = btntext[x];
        navbutton->Spacing = 0;
        navbutton->Layout = blGlyphTop;
        }
    }

例子

于 2012-05-04T19:16:04.900 回答
1

在这里你有一个完整的例子来说明如何做到这一点

http://delphi.about.com/od/usedbvcl/l/aa090203a.htm

它是用 Delphi 编写的,但代码可以很容易地适应 c++ builder。

于 2012-05-04T14:58:13.847 回答