CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQTreeView /-item OnMouseOver

by itroeger » 05 Jul 2013 09:11

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
itroeger
 
Posts: 15
Joined: 04 Jul 2013 10:10

by Alexander Bulei » 05 Jul 2013 09:21

Hi itroeger,

Implemented in V1.6.0.2622.

Thanks.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Jorge Sousa » 05 Jul 2013 09:31

Hello

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

cg
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by itroeger » 05 Jul 2013 12:42

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
itroeger
 
Posts: 15
Joined: 04 Jul 2013 10:10

by itroeger » 15 Jul 2013 14:25

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
itroeger
 
Posts: 15
Joined: 04 Jul 2013 10:10

by Alexander Bulei » 15 Jul 2013 15:58

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by itroeger » 16 Jul 2013 08:42

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
itroeger
 
Posts: 15
Joined: 04 Jul 2013 10:10

by Alexander Bulei » 16 Jul 2013 09:46

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.
You do not have the required permissions to view the files attached to this post.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQTreeView

Who is online

Users browsing this forum: No registered users and 3 guests

Contact Us.