有没有办法在C ++ builder中为TDBNavigator
按钮添加标题?
答案 0 :(得分: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;
}
}
答案 1 :(得分:1)
这里有一个如何做的完整示例
http://delphi.about.com/od/usedbvcl/l/aa090203a.htm
它是用Delphi编写的,但代码很容易适应c ++ builder。