Jump to content

TUniMenuItem in TUniPopupMenu not recognized


sysjames

Recommended Posts

I have a TUniPopUpMenu that has several items.  I wish to turn the visibility of the items on or off.  The Menu is called AccountMenu and a typical item is RenewSubscription1.  When I try code such as "AccountMenu.RenewSubscription1.Visible := False; "  the IDE tells me that "[dcc32 Error] Main.pas(440): E2003 Undeclared identifier: 'RenewSubscription1'".

How do I get to the menu item to turn the visibility feature on or off?

Link to comment
Share on other sites

1 hour ago, sysjames said:

I have a TUniPopUpMenu that has several items.  I wish to turn the visibility of the items on or off.  The Menu is called AccountMenu and a typical item is RenewSubscription1.  When I try code such as "AccountMenu.RenewSubscription1.Visible := False; "  the IDE tells me that "[dcc32 Error] Main.pas(440): E2003 Undeclared identifier: 'RenewSubscription1'".

How can we reproduce this issue?

Link to comment
Share on other sites

6 hours ago, sysjames said:

i see i must reference the menu items by position, rather than by name.  (I wonder what the name property is used for?). 

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
//
  UniPopupMenu1.One.Visible := False;
end;

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
//
  One.Visible := False;
end;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...