Jump to content

Recommended Posts

Posted

Hy ..

 

how can i subtract the value of the scrollbar in this code:

 

procedure TMAINFRAME_WARTUNG.m1Click(Sender: TObject);
var x:Integer;
begin

x:= (sender as TUniContainerPanel).Top+200; // to become a correct position relative to screen

UniSession.AddJS(f1.JSName    + '.animate({ duration: 400, to: { y:'+inttostr(x)+'}});');
UniSession.AddJS(s1.JSName    + '.animate({ duration: 400, to: { y:'+inttostr(x+117)+'}});');
end;
 
This code works fine since the scrollbar of uniscrollbox1 is at the top ... if i scroll down, the position of "animate" does not match (animate is absolut to screen coordinates)
 
 
uniscrollbox1 is located in MAIN ... the content is TMAINFRAME_WARTUNG = class(TUniFrame) ..
m1, f1 and s1 are UniContainerpanels...
 
Hope, someone can help
 
ThanX
Erich

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