WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 03-24-2016, 06:44 AM
Martina Martina is offline
Join Date: Feb 2016
Posts: 2
vizdlg Panel Size


I'm looking to get the size of an auto-scaled vizdlg Panel (I need its length and height). Is there a way to do this?

Reply With Quote
Old 03-25-2016, 08:45 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,466
I'm not sure but will look into it. Can you post example code you're using to scale the panel?
Reply With Quote
Old 03-27-2016, 10:22 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,466
Use the Panel.getBoundingBox method to get the panel dimensions:

import viz
import vizshape
import vizdlg


myPanel = vizdlg.Panel(align=viz.ALIGN_LEFT_BOTTOM)
row = vizdlg.Panel(layout=vizdlg.LAYOUT_HORZ_BOTTOM,border=False,background=False,margin=0)
textbox = row.addItem(viz.addTextbox())

circle = vizshape.addCircle(parent=viz.ORTHO,scale=[20,20,1],color=viz.RED)

def showPanelDimensions():
	box = myPanel.getBoundingBox()
	width = box.width
	height = box.height
	print width,height

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
Draw order of vizinfo Panel mape2k Vizard 2 10-08-2015 02:59 PM
Changes in vizdlg or vizact in Vizard 5? mape2k Vizard 2 12-10-2014 05:58 AM
Problem Vizdlg panel draw order Chapre Vizard 1 05-17-2011 02:29 PM
vizdlg Panel: Add and remove disbeat Vizard 2 02-08-2011 12:44 PM
vizdlg dialog components on a single panel Chapre Vizard 3 11-20-2010 02:47 PM

All times are GMT -7. The time now is 02:28 AM.

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