Jump to content

Recommended Posts

Posted

Certainly.

 

I've added a MouseDown event handler to a tree view. So I can display a popup menu when the user does a right click on the Treeview Items.

 

procedure TfrmTransactions.tvTransMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
 if Button=mbRight then
  UniPopupMenu1.Popup(X, Y,tvtrans);
end;
 
By having UniGui 'trap' the MouseDown like this - it's not possible to scroll the items in the TreeView by clicking on the scroll bars. That is clicking on the scroll bar or the up/down arrows of the TreeView has no effect.
Taking out the MouseDown event handler restores normal behavior.
 
Thanks
Posted

Like this  (as a temp fix - subtracting about 200 seems about right to align the menu again for the window sizes I'm using)

 

procedure TfrmTransactions.tvTransCellContextClick(ANode: TUniTreeNode; X,
  Y: Integer);
begin
  UniPopupMenu1.Popup(X, Y -190,tvtrans);
end;
 
Cheers

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