TDBNavigator Images lazarus / 31-LCL ---------------------------------------------------------------------- jack · 2012-06-05 13:41 Is there an option to change the Arrows in this control? I would like to replace the Green Drawings with simple text characters. |<<  <  >  >>| Thank you for your help. ---------------------------------------------------------------------- jack · 2012-08-06 01:54 After two months I'll Guess its big green arrows going forward. ---------------------------------------------------------------------- wp · 2012-08-06 09:18 What about this? Not perfect, but it might give you an idea how to access the hidden DBNavigator buttons. For example, you could replace the glyphs by your own bitmaps in a similar way. Code: [Select]type   TMyDBNavigator = class(TDBNavigator)   end; procedure ChangeNavButton(ANavigator:TDBNavigator; ABtn:TDBNavButtontype; ASymbol:string); begin   with TMyDBNavigator(ANavigator).Buttons[ABtn] do begin     Glyph := nil;     Caption := ASymbol;     Font.Style := [fsBold];   end; end; { TForm1 } procedure TForm1.FormCreate(Sender: TObject); begin   ChangeNavButton(DBNavigator1, nbPrior, ' < ');   ChangeNavButton(DBNavigator1, nbNext,  ' > ');   ChangeNavButton(DBNavigator1, nbFirst, ' |« ');   ChangeNavButton(DBNavigator1, nbLast,  ' »| '); end; ---------------------------------------------------------------------- jack · 2012-08-07 21:59 Thanks for the help. ---------------------------------------------------------------------- M.A.R.C. · 2019-08-30 06:23 Quote from: wp on August 06, 2012, 11:18:41 amWhat about this? Not perfect, but it might give you an idea how to access the hidden DBNavigator buttons. For example, you could replace the glyphs by your own bitmaps in a similar way. Code: [Select]type   TMyDBNavigator = class(TDBNavigator)   end; procedure ChangeNavButton(ANavigator:TDBNavigator; ABtn:TDBNavButtontype; ASymbol:string); begin   with TMyDBNavigator(ANavigator).Buttons[ABtn] do begin     Glyph := nil;     Caption := ASymbol;     Font.Style := [fsBold];   end; end; { TForm1 } procedure TForm1.FormCreate(Sender: TObject); begin   ChangeNavButton(DBNavigator1, nbPrior, ' < ');   ChangeNavButton(DBNavigator1, nbNext,  ' > ');   ChangeNavButton(DBNavigator1, nbFirst, ' |« ');   ChangeNavButton(DBNavigator1, nbLast,  ' »| '); end; Lazarus 2.0.5 r61738 FPC 3.0.4 Error EInvalidClass: Invalid type cast in TMyDBNavigator(ANavigator).Buttons[ABtn] ---------------------------------------------------------------------- wp · 2019-08-30 07:26 No compilation issue for me (Win 10, Laz 3.2/fpc3.0.4, Laz 2.0.4/fpc3.0.4). Or you can avoid the "hacker's typecast" by this modification: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure ChangeNavButton(ANavigator:TDBNavigator; ABtn:TDBNavButtontype; ASymbol:string);var  i: Integer;  btn: TDBNavButton;begin  for i:=0 to ANavigator.ControlCount-1 do    if (ANavigator.Controls[i] is TDBNavButton) then begin      btn := TDBNavButton(ANavigator.Controls[i]);      if btn.Index = ABtn then begin        btn.Glyph := nil;        btn.Caption := ASymbol;        btn.Font.Style := [fsBOld];        exit;      end;    end;end;