TBiDiDBNavigator glyphs are missing on Delphi XE2

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

TBiDiDBNavigator glyphs are missing on Delphi XE2

Postby IMeMine » November 1st, 2012, 1:23 pm

Hi,

I have been using TBiDiDBNavigator on the development of database applications on Delphi 6.0 to Delphi 2010 without any problem.

I have installed TBiDiDBNavigator on Delphi XE2 without any problem.

When I pick the BiDiDBnavigator component and put it on a form all the glyphs of its buttons are visible.

When I save the project files and then I open the project all the glyphs of all the buttons of the BiDiDBNavigator component are missing and only the borders of the glyphs are visible.

Do anybody have any idea how to solve this problem?

Best regards,

IMeMine
IMeMine
Member
Member
 
Posts: 4
Joined: November 1st, 2012, 12:15 pm

Re: TBiDiDBNavigator glyphs are missing on Delphi XE2

Postby Kambiz » November 4th, 2012, 1:39 pm

I tried to figure out the reason but I couldn't find.
The component is derived from standard TDBNavigator and the buttons are the same TSpeedButtons of original TDBNavigator. It's really strange that the buttons do not use the glyphs.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: TBiDiDBNavigator glyphs are missing on Delphi XE2

Postby IMeMine » November 4th, 2012, 3:29 pm

Hi,

Thank you for your answer.

I have tried to figure out why the glyphs of the BiDiDBNavigator component do not appear correctly on Delphi XE2.

TBiDiDBNavigator = class(TDBNavigator)

Protected Property TDBNavigator.Button : TNavButton

TNavButton = class(TSpeedButton)

Published property TspeedButton.Glyph: TBitmap read GetGlyph write SetGlyph stored HasCustomGlyph;

function TSpeedButton.HasCustomGlyph: Boolean;
var
Link: TSpeedButtonActionLink;
begin
Link := TSpeedButtonActionLink(ActionLink);
Result := not ((Link <> nil) and Link.IsImageIndexLinked and Link.IsGlyphLinked(Link.FImageIndex));
end;

The Delphi XE2 documentation states the following:
"When saving a component's state, the storage specifiers of the component's published properties are checked.
If a property's current value is different from its default value (or if there is no default value) and the stored specifier is True, then the property's value is saved. Otherwise, the property's value is not saved."

Maybe the the HasCustomGlyph function is always returning False and because of that the glyphs are not stored.

I will try to find a solution concerning this problem and if I find it I will let you know so every one who uses your BiDiDBNavigator component will have the pleasure to use it on Delphi XE2, Delphi XE3 and so on.

Best regards,

IMeMine
IMeMine
Member
Member
 
Posts: 4
Joined: November 1st, 2012, 12:15 pm

Re: TBiDiDBNavigator glyphs are missing on Delphi XE2

Postby Kambiz » November 4th, 2012, 7:06 pm

Thank you for your effort.

The component loads the glyphs properly and at runtime the SpeedButtons have the glyphs. They just don't draw the glyphs.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: TBiDiDBNavigator glyphs are missing on Delphi XE2

Postby IMeMine » November 5th, 2012, 4:31 pm

That is right.

I have also noticed that when I pick the BiDiDBNavigator component and put it on a form all the glyphs are showed without any problem.

But when I save the project, close it and reopen it then all the glyphs are missing. Only the borders of the glyphs are showed.

This is a strange behavior.

I will investigate with...
IMeMine
Member
Member
 
Posts: 4
Joined: November 1st, 2012, 12:15 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 23 guests

cron