WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 11-17-2017, 11:47 AM
Vishav Vishav is offline
Join Date: Jun 2017
Posts: 54
How to change position of Radio Button in vizinfo.infoPanel?

Dear all

I want second radio button shown in the attached image near to ball picture as in case of apple. Use of set position command of the radio button is not making any effect. How to do it?

Source Code:
infoBox = vizinfo.InfoPanel('What object i am interested in?',fontSize=20,window=viz.MainWindow,icon=False, align=viz.ALIGN_CENTER)
infoBox.setTitle( 'Question 1' )
Apple = infoBox.addLabelItem('', viz.addRadioButton('color'))
mapPos = [700,450,500]
mapScale = [200,200,200]
apple_i = viz.addTexQuad(parent=viz.ORTHO,scale=mapScale,pos =mapPos)
ball_i= viz.addTexQuad(parent=viz.ORTHO,scale=mapScale,pos =[700,215,500])
Ball= infoBox.addLabelItem('', viz.addRadioButton('color',pos=(680,500,500)))

submitButton = infoBox.addItem(viz.addButtonLabel('Submit'),align =viz.ALIGN_CENTER)
yield viztask.waitButtonUp(submitButton)


Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	72
Size:	32.1 KB
ID:	961  
Reply With Quote
Old 11-21-2017, 02:36 AM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,462
It's possible to create custom layouts by adding vizdlg panels to the vizinfo panel. Texture quads can be added directly to panels. Here's an example:

import viz
import vizinfo
import vizdlg


dojo = viz.addChild('dojo.osgb')
info = vizinfo.InfoPanel('Custom info panel')

row1 = vizdlg.Panel(layout=vizdlg.LAYOUT_HORZ_TOP,background=False,border=False)
radio1 = row1.addItem(viz.addRadioButton('images'))
texture1 = viz.addTexture('images/tile_grass.jpg')
quad1 = viz.addTexQuad(texture=texture1, scale=[100,100,1], align=viz.ALIGN_CENTER)

row2 = vizdlg.Panel(layout=vizdlg.LAYOUT_HORZ_TOP,background=False,border=False)
radio2 = row2.addItem(viz.addRadioButton('images'))
texture2 = viz.addTexture('images/tile_stone.jpg')
quad2 = viz.addTexQuad(texture=texture2, scale=[100,100,1], align=viz.ALIGN_CENTER)
Reply With Quote
Old 11-21-2017, 05:04 AM
Vishav Vishav is offline
Join Date: Jun 2017
Posts: 54
Thanks, Jeff It is working fine. You are great!
Reply With Quote

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
Is that possible to change the scale and position of vizmenu? haohaoxuexi1 Vizard 1 06-26-2016 01:33 AM
Change the color of button Eugene Vizard 1 06-23-2016 06:25 AM
Changing parent without changing absolute global position? The SundanceKid Vizard 2 05-23-2014 03:43 PM
Change position of MainView after COLLISION_EVENT kay Vizard 5 10-07-2010 06:06 PM
Randomly and Continuously Change Avatar's Face Texture Karla Vizard 4 08-22-2008 01:14 PM

All times are GMT -7. The time now is 10:16 PM.

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