Page 1 of 1

TIWCGJQTreeView /-item OnMouseOver

PostPosted: 05 Jul 2013 09:11
by itroeger
Hello,

I have another question regarding the TIWCGJQTreeView / TIWCGJQTreeViewItem
component. Is it possible to implement an OnMouseOver-Event for the TreeViewItems?

Or is there a different way to get the TreeViewItem which is subjacent to the mouse cursor?

Kind Regards,
Ingo Tröger

Re: TIWCGJQTreeView /-item OnMouseOver

PostPosted: 05 Jul 2013 09:21
by Alexander Bulei
Hi itroeger,

Implemented in V1.6.0.2622.

Thanks.

Best Regards.

Re: TIWCGJQTreeView /-item OnMouseOver

PostPosted: 05 Jul 2013 09:31
by Jorge Sousa
Hello

I hope you're not going to use Mouse events that goes to server.

cg

Re: TIWCGJQTreeView /-item OnMouseOver

PostPosted: 05 Jul 2013 12:42
by itroeger
Hello,

I think it should work with a clientsite mouse event. I just need to get
a property of an object which is linked to the TreeViewItem.

Thanks for the top support!

Kind regards,
Ingo Troeger

Re: TIWCGJQTreeView /-item OnMouseOver

PostPosted: 15 Jul 2013 14:25
by itroeger
Hello,

I need to know the node which fires the OnHoverNode event.
Is there a similar way like the one to get the selected node (jsGetHovered)?

Code: Select all
with tvFolderCG.JQEvents.OnHoverNode do
   begin
    with BrowserParams.Add do
     begin
      BrowserScript:= tvFolderCG.JQTreeViewOptions.UIPlugin.jsGetSelected + '.attr("id")';
      ServerName:= 'NodeID';
     end;
   end;


Kind regards,
Ingo Tröger

Re: TIWCGJQTreeView /-item OnMouseOver

PostPosted: 15 Jul 2013 15:58
by Alexander Bulei
Hi itroeger,

As my colleague said:

cgdevtools_support wrote:Hello

I hope you're not going to use Mouse events that goes to server.

cg


if you will do this, will cause slowness..

For client side, you should use OnHoverNode.Script property.
For get uniquename or user attr, you should do this in OnHoverNode.Script:

javascript code
var myattr = $(data.args).attr("uniquename"); // or custom attr


Best Regards.

Re: TIWCGJQTreeView /-item OnMouseOver

PostPosted: 16 Jul 2013 08:42
by itroeger
Hi cgdevtools,

thank you for your patience.
For test purpose I have a main form and a frame with a
treeview on it. On the main form is a button to display
the frame after click.

Within the ProcessCommand procedure of the frame I placed
the following code:

delphi code
tvTest.JQEvents.OnHoverNode.Script:=
'var myattr = $(data.args).attr("uniquename");';


Now, when I want to display the frame by clicking the button
it is not displayed. Without the codesnippet it is displayed.
Is there a trick how to solve this problem?

Kind regards,
Ingo Tröger

Re: TIWCGJQTreeView /-item OnMouseOver

PostPosted: 16 Jul 2013 09:46
by Alexander Bulei
Hi itroeger,

You missed important things...please see attached demo.

P.S: I found the small issue in jquery plugin. When node is expanded/collapsed, sometimes plugin send wrong data object.


Best Regards.