Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 23rd, 2025, 6:38 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to make scrollable text not reset when leaving the page
PostPosted: July 30th, 2005, 9:43 pm 
Offline

Joined: May 7th, 2005, 10:08 pm
Posts: 249
Hello,
I'm using Opus Pro 2.81. On my menu page, I have a long scrollable text box, with a different hypertext item on each line. When I click on a hypertext item, I am taken to another page. When I return to the menu page, I'd like the scrollable text to still be in the position at which I left it, instead of resetting and scrolling back to the top. Does anyone know how to do this?
Thanks,
Mike


Top
 Profile  
 
 Post subject:
PostPosted: July 31st, 2005, 12:20 am 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
Hi Mike

Create a publication variable "Scroll_Pos"
Type = number
Initial value = 0

Assuming the name of the text object is Text 1

Give the page a Pre-Hide trigger with this script
===================

var x = Text_1.GetScrollInfo()
Scroll_Pos = x.vpos

===================

Give the page a Pre-Show trigger with this script
===================

Text_1.SetScrollPosition(Scroll_Pos,-1)

===================

HTH
Chris

_________________
Opus Resources and Services


Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 31st, 2005, 4:25 am 
Offline

Joined: May 7th, 2005, 10:08 pm
Posts: 249
Chris Jones wrote:
Hi Mike

Create a publication variable "Scroll_Pos"
Type = number
Initial value = 0

Assuming the name of the text object is Text 1

Give the page a Pre-Hide trigger with this script
===================

var x = Text_1.GetScrollInfo()
Scroll_Pos = x.vpos

===================

Give the page a Pre-Show trigger with this script
===================

Text_1.SetScrollPosition(Scroll_Pos,-1)

===================

HTH
Chris


Chris, thanks very much! :lol:
I'll give it a whirl!
Mike


Top
 Profile  
 
 Post subject:
PostPosted: July 31st, 2005, 4:37 am 
Offline

Joined: May 7th, 2005, 10:08 pm
Posts: 249
Chris,
It works splendidly.
Thanks a mil!
Mike


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group