Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 1:04 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Html text and colours in text
PostPosted: March 15th, 2005, 10:52 am 
Offline

Joined: January 19th, 2005, 5:15 pm
Posts: 83
Location: Netherlands
I'm using text from a database in a text field. This text from the database contains html lay-out tags like <p> , <li> and <b>.

Is there a way to let Opus process the text as html text.


Another question: Is there a way to give different lines in a dynamic textfield different colours? I need to put some headlines in between parts of text. These headlines must have a different colour than the rest of the text, and must scroll with the rest of the text (so i assume seperate textfields wont't work. Especially because the text is of variable length). Can i script this in any way?

Thanks !


Top
 Profile  
 
 Post subject: Re: Html text and colours in text
PostPosted: March 15th, 2005, 3:47 pm 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Reemski wrote:
I'm using text from a database in a text field. This text from the database contains html lay-out tags like <p> , <li> and <b>.

Is there a way to let Opus process the text as html text.


The easiest way to achieve this would be to retrieve the text from the database and write it directly to a .htm file using OpenFile() and Write() functions. You can now close this file using the CloseFile() function and display a Browser object which points to the .htm file to show the rendered web page.

I have attached a small example publication and database which demonstrate this.

Reemski wrote:
Another question: Is there a way to give different lines in a dynamic textfield different colours?


This effect is commonly known as a 'zebra table' and is popular in many applications (most notably iTunes).

I'm sure there is a dynamic way of achieving this via script, but I have attached a sample publication which uses a more clunky method. I have basically added a series of horizontal frames of alternating colours behind each visible row of a text box. I have then added my own up and down scroll buttons which determine which line is at the top of the text box. If the text is scrollable, a series of SetBackground() functions change the currently-blue frames to pink and vice versa. This swapping is prevented if you try to scroll past the top or bottom lines of the text box, so it should not matter if the text box was dynamically populated - the zebra table should behave correctly.

I hope this helps. Please do not hesitate to contact me if you have any further queries.

Kind regards,


You do not have the required permissions to view the files attached to this post.

_________________
Robin Garrett
Digital Workshop Technical Support


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 54 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