View Issue Details

IDProjectCategoryView StatusLast Update
0001535JEDI VCL00 JVCL Componentspublic2004-03-27 12:00
ReportermwintersAssigned Touser72 
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001535: TJvXPBarItem and TJvXPBar are not action update friendly
DescriptionWhen testing the TJvXPBar to use in an application, I found that when using TActionManager for my actions (delphi 6.+) Bar Items would not update accordingly, there appeared to be some code missing..
Additional InformationFix I used was - adding the public method to TJvXPCustomWinXPBar

    procedure InitiateAction; override;
with the implementation of..

procedure TJvXPCustomWinXPBar.InitiateAction;
  i: Integer;
  inherited InitiateAction;

  // go through each item and update
  for i:= 0 to Items.Count - 1 do
    Items[i].ActionChange(Items[i].Action, csLoading in ComponentState);

Also a change to TJvXPBarItem.ActionChange

to thus (2 added lines)..
procedure TJvXPBarItem.ActionChange(Sender: TObject;
  CheckDefaults: Boolean);
  if Action is TCustomAction then
    with TCustomAction(Sender) do
      if(CheckDefaults or Update()) then // mw added to update action
        if not CheckDefaults or (Self.Caption = '') then
          Self.Caption := Caption;
        if not CheckDefaults or Self.Enabled then
          Self.Enabled := Enabled;
        if not CheckDefaults or (Self.Hint = '') then
          Self.Hint := Hint;
        if not CheckDefaults or (Self.ImageIndex = -1) then
          Self.ImageIndex := ImageIndex;
        if not CheckDefaults or Self.Visible then
          Self.Visible := Visible;
        if not CheckDefaults or not Assigned(Self.OnClick) then
          Self.OnClick := OnExecute;

TagsNo tags attached.



2004-03-27 12:00


Updated in CVS. Thanks for the fix.

Issue History

Date Modified Username Field Change
2004-03-26 21:36 mwinters New Issue
2004-03-27 05:02 user72 Status new => assigned
2004-03-27 05:02 user72 Assigned To => user72
2004-03-27 12:00 user72 Status assigned => resolved
2004-03-27 12:00 user72 Resolution open => fixed
2004-03-27 12:00 user72 Note Added: 0003487