View Issue Details

IDProjectCategoryView StatusLast Update
0001535JEDI VCL00 JVCL Componentspublic2004-03-27 12:00
ReportermwintersAssigned Touser72 
PrioritynormalSeveritytrivialReproducibilityalways
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;
var
  i: Integer;
begin
  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);
end;


Also a change to TJvXPBarItem.ActionChange

to thus (2 added lines)..
procedure TJvXPBarItem.ActionChange(Sender: TObject;
  CheckDefaults: Boolean);
begin
  if Action is TCustomAction then
    with TCustomAction(Sender) do
    begin
      if(CheckDefaults or Update()) then // mw added to update action
      begin
        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;
      end;
    end;
end;

TagsNo tags attached.

Activities

user72

2004-03-27 12:00

  ~0003487

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