Board index » delphi » DBNavigator Glyphs: Help

DBNavigator Glyphs: Help

Some years ago I seem to remember I had read on this newsgroup a message
about something like an .ini entry file to modify the style of the
DBNavigator buttons; the first time I saw Delphi, it had nice coloured
glyphs for the buttons, but on my system the buttons appear with the simple
black icons also shown on the help page of the component.
I know how to customize the glyphs, thanks to another message appeared in
this newsgroup at that time, but I wanted to know if the DBNavigator
component already includes standard glyphs and how to activate them, or if
the version I saw the first time was a sort of advanced/upgraded version of
the component.

Thanks in advance,

Manuela Lanci

 

Re:DBNavigator Glyphs: Help


Lanci,

You can substitute your own glyphs in a DBNavigator. Here is an example
of doing it from an ImageList but it would probably be better to store
your glyphs in a resource and load from there.

var c: integer;
begin
  with DBNavigator1 do
    for c := 0 to ControlCount -1 do
      if Controls[c] is TNavButton then
        with TNavButton(Controls[c]) do
        begin
          Glyph := nil;
          case TNavigateBtn(c) of
            nbInsert : Imagelist1.GetBitmap(0,Glyph);
            nbDelete : Imagelist1.GetBitmap(1,Glyph);
            nbPost   : Imagelist1.GetBitmap(2,Glyph);
            nbCancel : Imagelist1.GetBitmap(3,Glyph);
          end;
        end;

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

Other Threads