by 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