WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-08-2015, 10:53 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Multi-line text node

Is this possible? I couldn't find a way to insert special characters to a text node (e.g. TAB or RETURN).

Thanks!
Reply With Quote
  #2  
Old 06-08-2015, 11:37 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,465
Here's example code that uses the newline character to create multiple lines in a text object:

Code:
import viz
viz.go()

gallery = viz.addChild('gallery.osgb')

text = viz.addText('line 1\nline 2\nline 3',parent=viz.SCREEN,pos=[0.5,0.5,0])
text.alignment(viz.ALIGN_CENTER)
Reply With Quote
  #3  
Old 06-08-2015, 01:19 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Thanks Jeff. I actually just found it and wanted to post it.
Is there a way to insert other special characters, like TABs?
Reply With Quote
  #4  
Old 06-10-2015, 04:19 AM
mape2k mape2k is offline
Member
 
Join Date: Mar 2013
Posts: 60
Hello tokola,

didn't you asked the exact same question in another thread just a week ago?

There I stated that using "\t" should insert a tab into your string.

Best,
Johannes
Reply With Quote
  #5  
Old 06-10-2015, 09:15 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
I am so sorry. You're absolutely right. I totally forgot about it. I think dementia is on the way

I'll probably delete one of the two (if possible) to avoid unnecessary clutter of the forum.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
input from a text file dig Vizard 5 10-20-2013 01:20 AM
OSG Text Node Additional Parameters pcatalano Vizard 2 11-01-2011 07:45 AM
multi line text boxes mjabon Vizard 2 07-16-2009 11:37 AM
Informationboxes with text snoopy78 Vizard 3 07-16-2009 10:23 AM
I cannot show wrl file with text node sled Vizard 3 06-25-2003 07:52 AM


All times are GMT -7. The time now is 09:25 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC