DBNavigator Images with Delphi Theme - XE2

Components on the Raize Panels palette: panels, group bars, page controls, splitters, toolbars, status bars, group boxes, etc.

DBNavigator Images with Delphi Theme - XE2

Postby Hooman » Tue May 06, 2014 11:10 pm

Hi,

We are using TStyleManager from Vcl.Themes to set different theme on our app. Everything looks to be working fine except RzDBNavigator.

We set the ImageList for Navigator and each button has a different ImageIndex.

Here is our code to set the theme across program.
TStyleManager.TrySetStyle(StyleName);

The problem is that the DBNavigator show our icon for each button but show the default icon on top of that. If we set the Theme to Windows, it removed the small icons and we are good.

Can you please let me know what would be the solution to remove that default icon?

Regards,
Hooman
Hooman
 
Posts: 2
Joined:
Mon May 05, 2014 2:25 pm

Re: DBNavigator Images with Delphi Theme - XE2

Postby Raize Support » Thu May 08, 2014 12:47 am

Hi Hooman,

Thanks for the report. Good catch. We've fixed this for the next build. In the meantime, you can fix this yourself by modifying the RzDBNav.pas unit. In particular, modify the TRzNavigatorToolButton.Paint method to match the following. Not the entire method is included, just the beginning that includes the modified portion. In particular the addition of the Idx variable and the test of GetImageIndex.

Code: Select all
procedure TRzNavigatorToolButton.Paint;
{$IFDEF VCL160_OR_HIGHER}
// Constants
{$ENDIF}
var
  R: TRect;
  Idx: Integer;
  {$IFDEF VCL160_OR_HIGHER}
  Element: TThemedDataNavButtons;
  {$ENDIF}
begin
  inherited Paint;

  Idx := Ord( NavBtn ) * 2;

  if not UsingSystemStyle and ( TRzDBNavigator( Parent ).FImageIndexes.GetImageIndex( Idx ) = -1 ) then
  begin


Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 605
Joined:
Fri Mar 25, 2011 9:04 pm

Re: DBNavigator Images with Delphi Theme - XE2

Postby Hooman » Thu May 08, 2014 1:29 am

Hi Ray,

Thanks for the quick reply. I have tested and it works fine.

Thanks
Hooman
Hooman
 
Posts: 2
Joined:
Mon May 05, 2014 2:25 pm


Return to Panels

Who is online

Users browsing this forum: No registered users and 1 guest