WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-18-2016, 09:16 AM
iva iva is offline
Member
 
Join Date: Mar 2013
Posts: 10
Slider with 2 labels

Hey guys,

I am trying to make a slider that has 2 labels, like this:

Very uncertain -------------------[]---- Very certain

I am using vizinfo, but I don't think this is an option. Anyone has a suggestion how to do it in an elegant way? Thank you!
Reply With Quote
  #2  
Old 08-19-2016, 08:23 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Are you using the vizinfo panel for other GUI elements or just the slider and text? Panels from the vizdlg library support custom GUI layouts.
Reply With Quote
  #3  
Old 08-25-2016, 08:20 AM
iva iva is offline
Member
 
Join Date: Mar 2013
Posts: 10
I am using it for other elements, too. It would be kind of a weird switch to use vizdlg just for the slider i think...
Reply With Quote
  #4  
Old 08-28-2016, 01:21 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can customize a vizinfo panel by adding vizdlg panels to it:

Code:
import viz
import vizinfo
import vizdlg

viz.go()

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

info = vizinfo.InfoPanel('InfoPanel with custom layout')

info.addSeparator()
textbox1 = info.addLabelItem('text box 1',viz.addTextbox())
textbox2 = info.addLabelItem('text box 2',viz.addTextbox())

info.addSection('vizdlg sub-panel with 3 elements in a row')
row = vizdlg.Panel(layout=vizdlg.LAYOUT_HORZ_BOTTOM,background=False,border=False)
text1 = row.addItem(viz.addText('Very uncertain'))
slider = row.addItem(viz.addSlider())
text2 = row.addItem(viz.addText('Very certain'))
info.addItem(row)
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
Slider Assistance new_horizon Vizard 3 05-16-2012 07:32 AM
adding more than 1 action for avatar animation slider control yak Vizard 0 07-21-2009 11:22 AM
help with slider code yak Vizard 2 07-20-2009 12:12 PM
Vizmenu slider bug? Gladsomebeast Vizard 2 10-22-2008 08:05 PM
Blending/Fading 5 Textures with a Slider south_bank Vizard 2 05-15-2008 07:59 AM


All times are GMT -7. The time now is 04:32 AM.


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