TDBNavigator
C++ ビルダーでボタンにキャプションを追加する方法はありますか?
1283 次
2 に答える
2
これにより、C++ ビルダーの各ボタンにキャプションを追加できます
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++ ビルダーに簡単に適応できます。
于 2012-05-04T14:58:13.847 に答える