Jump to content

Animate Label and DBGrid


JDDEV

Recommended Posts

Hi,

 

I have to develop a form viewing on a TV (no user action is possible).

 

1) I would like to scroll a label from the right of his parent panel to the left, to look at a message.

2) i would like to scroll a DBGrid (with large number of lines) from the first line to the last, to look for all the lines of the grid.

 

Thanks a lot to help me how can i use "animate" function...

ex:

UniSession.AddJS(UniLabelMsgInfo.JSName + '.animate({???}, 3000);');
UniSession.AddJS(UniDBGrid1.JSName + '.animate({???}, 3000);');
 

Link to comment
Share on other sites

Hy ..

 

if it helps: 

This line move the UniImage4 in 300ms to the position x/y


UniSession.AddJS(UniImage4.JSName + '.animate({ duration: 300, to: { x: '+inttostr(x)+', y: '+inttostr(y)+', opacity:100 }});');

Link to comment
Share on other sites

Thank's

 

This is the solution :

 

In the FormCreate function :

 

  UniLabelMsgInfo.ClientEvents.ExtEvents.Values['beforeshow']:='function window.beforeshow(sender, eOpts) {'
    +'  sender.animate({ duration: 0, to: { x:2000, opacity: 0} }); '
    +'  sender.animate({ duration: 10000, to: { x:'+IntToStr(UniLabelMsgInfo.left)+', opacity: 100} }); '
    +'}';
 

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