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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...