Board index » delphi » easy way to cutomize DBNavigator?

easy way to cutomize DBNavigator?

I just want to change the pics on a DBNavigator... is there a simple way to
do it?
 

Re:easy way to cutomize DBNavigator?


Instead of dbnavigator, you may consider using a standard Toolbar control
and connect toolbar buttons to predefined dataset actions (such as
TDataSetFirst, TDataSetLast...)  in the ActionList component. Add an
ImageList component to the form and connected it to the ActionList, to match
images for the standard actions.

Quote
"Frederic Gelinas" <fgeli...@si.qc.ca> wrote in message

news:3a4b65f2_2@dnews...
Quote
> I just want to change the pics on a DBNavigator... is there a simple way
to
> do it?

Re:easy way to cutomize DBNavigator?


Here's some code to replace the glyphs with captions:

with DBNavigator1 do
    for c := 0 to ControlCount -1 do
      if Controls[c] is TNavButton then
        with TNavButton(Controls[c]) do
        begin
          Glyph := nil;
          Font.Style := [fsBold];
          case TNavigateBtn(c) of
            nbInsert : Caption := 'Add';
            nbDelete : Caption := 'Delete';
            nbPost   : Caption := 'Post';
            nbCancel : Caption := 'Cancel';
          end;
        end;

To change the glyphs, build the glyphs you want into a resource and
adapt the above code to assign the replacement glyphs.

Bob
---
Sent using Virtual Access 5.01 - download your freeware copy now
http://www.atlantic-coast.com/downloads/vasetup.exe

Other Threads