Jump to content

MouseDown and Scroll bars


Harry Rogers

Recommended Posts

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