View Issue Details

IDProjectCategoryView StatusLast Update
0002456JEDI VCL00 JVCL Componentspublic2005-01-03 06:12
ReporterSimesAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 BETA 2 
Target VersionFixed in Version3.00 RC 1 
Summary0002456: TJvPopUpMenu caption incorrect
DescriptionRun the code below. The pop-up menu caption is shown as '0 ' when it should show more text. This only occurs when there is in invisible menu item after the item of interest.

Tested in D5 Pro and D7 Enterprise.
Additional Informationunit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, Menus, JvMenus, StdCtrls;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
  public
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

const
  ShowBug1: boolean = true; // change either of these to false, ...
  ShowBug2: boolean = true; // ...and the bug doesn't happen

procedure TForm1.FormCreate(Sender: TObject);
var
  mi: TMenuItem;
begin
  PopUpMenu := TJvPopupMenu.Create(Self);
  TJvPopupMenu(PopUpMenu).Style := msXP;

  mi := TMenuItem.Create(self);
  PopUpMenu.Items.Add(mi);
  mi.Caption := '&0. This caption isn''t shown!';

  if ShowBug1 then begin
    mi := TMenuItem.Create(self);
    PopUpMenu.Items.Add(mi);
    mi.Caption := '&1. When this isn''t visible';
    mi.Visible := not ShowBug2;
  end;
end;

end.
TagsNo tags attached.

Activities

AHUser

2005-01-03 06:12

developer   ~0006067

Fixed in CVS.

Issue History

Date Modified Username Field Change
2005-01-02 13:43 Simes New Issue
2005-01-03 06:12 AHUser Status new => resolved
2005-01-03 06:12 AHUser Resolution open => fixed
2005-01-03 06:12 AHUser Assigned To => AHUser
2005-01-03 06:12 AHUser Note Added: 0006067
2005-01-03 06:12 AHUser Assigned To AHUser =>