Jump to content

TUniTreeMenu, TUniMenuItem with subitems. Onclick and collapse/extends action problem.


uniguisyriusz

Recommended Posts

Hi,

 

How to set onclick action to menuitem with subitems? After click on arrow of menuitem it extends and fires onclick, but I want only extend and see subitems.

 

Sorry, can you explain in more details, OnClick handler of what ?

Link to comment
Share on other sites

Here is video:


When I click item3 over the arrow, subitems are expanding and onclick is fire.

I want to only expand subitems of item3. When I click over the text "item3" only onclick is executing, subitems not expanding.

 

Code:

procedure TMainForm.item11Click(Sender: TObject);

begin

  ShowMessage('item1onclick');

 

end;

 

procedure TMainForm.item21Click(Sender: TObject);

begin

  ShowMessage('item2onclick');

end;

 

procedure TMainForm.item31Click(Sender: TObject);

begin

  ShowMessage('item3onclick');

end;

 

procedure TMainForm.subitem11Click(Sender: TObject);

begin

  ShowMessage('subitem1onclick');

end;

 

procedure TMainForm.subitem21Click(Sender: TObject);

begin

  ShowMessage('subitem2onclick');

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...