Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 4:44 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Horizontal Scrollbar on Text Object
PostPosted: January 28th, 2008, 8:53 pm 
Offline

Joined: December 25th, 2004, 3:31 pm
Posts: 178
Below is quoted from the Opus help file:
Quote:
You cannot add a Horizontal Scrollbar to a Text object because text automatically wraps at the end of the line to a new line. Therefore, you can never have text off-to-the-side, which means you do not require a Horizontal Scrollbar.


Why is it not possible to add this, also is it possible to disable automatic text wrapping on text boxes. This would be great and a feature I need to use.

Ideally I would like to check this via script. So something like,
if text is going to wrap, then reduce text size until not wrap.

Or add a scroll bar to text box if warp occurs.


Top
 Profile  
 
 Post subject:
PostPosted: January 29th, 2008, 2:55 pm 
Offline

Joined: October 25th, 2004, 4:03 pm
Posts: 249
Location: Digital Workshop
Opus: v7.04
OS: XP, Vista Home Premium, Win7 Professional 64bit
System: Dell Inspiron 560 Quad Core 2.5Ghz 4Gb RAM, 1Tb HD, HP laptop and various others
As I understand it, measuring the width of a piece of text to see if it needs to wrap requires some serious programming and won't be feasible in Opusscript.

Text will always wrap to the width of the text box containing it, otherwise you would have all your text on a single line which could be very wide indeed. Opus only knows how wide your text should be from the width of the text box though obviously this could be amended in script.

I'm not sure what you are trying to achieve. However, you can simulate a horizontal scrollbar on a piece of text by inserting the text box into a frame and adding the scrollbar to the frame rather than the text box. Remember to stretch the text box outside the limits of the frame by holding down the Ctrl key when resizing.

Paul Harris

_________________
Managing Director
Digital Workshop


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 29th, 2008, 5:49 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Oddly you can add a scrollbar to a textbox by cheating - although how effective this would be or what you want to achieve is another matter.

As Paul points out calculating where a wrap should occur is difficult because the width of each character is different and thus you can't simply say truncate after 14 characters. This method does work (I used it in IKIQ for the question naviagtion) but it isn't great as you have to keep the length of the text well under the actual length of the text box.

A more sophicated OpusScript might attempt to analyse the characters being displayed and make adjustments accordingly. Look up kerning & tracking in google to find out more about text layout.

Mack.

P.S The cheat for the scrollbar, which will be of little use, but novel none-the-less is to create a frame, add the h-bar and convert to a textbox :-)

_________________
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


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 29th, 2008, 6:19 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
If you wanted to use a browser object and HTML you could specify a DIV width/height set the style to show the scrollbar automatically if the text is too long and then you'd have your horizontal scrolling text.

Perhaps that's too clunky, but it is an option to get you horizontally scrollable text.

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 30th, 2008, 9:26 am 
Offline

Joined: December 25th, 2004, 3:31 pm
Posts: 178
Paul, thank you for your prompt reply.

Currently use script to get database information and then write to a text object, so use the "\n" in script for new line so I want control over which line text is on. Currently it's wrapped when I don't want it, causing alignment problems when I'm pulling lots of data from database on adjacent text objects.

In this situation being able to disable text wrap would be very useful for me anyway.

Also do you have any plans for auto scroll bars? Similar to the way HTML handles it so a text object by default doesn't show a scrollbar unless needed.


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

All times are UTC [ DST ]


Who is online

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