Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 11:45 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Scrolling of text in a text box
PostPosted: June 16th, 2014, 3:59 pm 
Offline

Joined: August 22nd, 2005, 11:56 am
Posts: 125
Location: The Netherlands
Opus: Pro 9.75 (Build 16749)
OS: Windows 10 Pro 64-bit
Have a small question... In my HTML5 (web) publication I've a text box which is filled with information by collecting data from a database. In the text box a variable (which holds the data from the database) is inserted to put the text there, which works OK.
However, some of the text is much larger than the text box can show, but I can't find the solution to scroll the text as scroll bars don't seem to work.
Please note that when I add some static text, it all seems to work OK...

Jan

_________________
"World War II Allied Aircraft Crashes in the Netherlands & North Sea" (Made with Opus Pro 9.75), available via https://www.airwar4045.nl


For this message Jan has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Scrolling of text in a text box
PostPosted: June 17th, 2014, 8:58 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Jan,

If you're using Firebug, right click on the text box and inspect the element. You'll notice that it's a DIV that contains an SVG element and another DIV with your content. Scrollbars in HTML are controlled by the CSS overflow property and these are set to hidden but need to be changed to auto.

There are various ways you could achieve this including adding the following code to an on-show on the text box:

Code:
document.getElementById(this.m_elementId).getElementsByTagName("DIV")[0].style.overflow = "auto";


Because this uses the default HTML scrollbars, you don't need to add them in Opus.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


For this message mackavi has been thanked by : Jan


Top
 Profile Visit website  
 
 Post subject: Re: Scrolling of text in a text box
PostPosted: June 17th, 2014, 1:19 pm 
Offline

Joined: August 22nd, 2005, 11:56 am
Posts: 125
Location: The Netherlands
Opus: Pro 9.75 (Build 16749)
OS: Windows 10 Pro 64-bit
Well, as I'm not a programmer by profession and do this as a hobby, I sometimes need the skills of the professionals :wink:
It works Mack... MANY THANKS!

Jan

_________________
"World War II Allied Aircraft Crashes in the Netherlands & North Sea" (Made with Opus Pro 9.75), available via https://www.airwar4045.nl


For this message Jan has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 16 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