2012-05-04 58 views
-4

有沒有辦法將標題添加到C++ builder中的TDBNavigator按鈕?在C++ builder中自定義TDBNavigator按鈕

+1

和你的努力....? –

+0

您如何製作自己的一組按鈕,不管您是否喜歡,都可以啓用/禁用,並在每次點擊時處理動作。大約1分鐘的工作。數據庫導航器控件僅適用於原型應用程序,並且不應該真正用於真正的應用程序。 –

回答

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; 
     } 
    } 

Example

+0

非常感謝你先生 – user1375136

+0

http://en.wikipedia .ORG /維基/爵士 – RBA