![]()  | 
	
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
				
				vizdlg Panel Size
			 
			
			
			Hi, 
		
		
		
		
		
		
		
		
	
	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? Best, Martina  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			I'm not sure but will look into it. Can you post example code you're using to scale the panel?
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Use the Panel.getBoundingBox method to get the panel dimensions: 
		
		
		
		
		
		
		
		
	
	Code: 
	import viz
import vizshape
import vizdlg
viz.go()
myPanel = vizdlg.Panel(align=viz.ALIGN_LEFT_BOTTOM)
row = vizdlg.Panel(layout=vizdlg.LAYOUT_HORZ_BOTTOM,border=False,background=False,margin=0)
row.addItem(viz.addText('Textbox'))
textbox = row.addItem(viz.addTextbox())
myPanel.addItem(row)
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
	circle.setPosition([width,height,0])
myPanel.setPanelScale(2)
showPanelDimensions()
 | 
![]()  | 
	
	
| Tags | 
| vizdlg | 
| Thread Tools | |
| Display Modes | Rate This Thread | 
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Draw order of vizinfo Panel | mape2k | Vizard | 2 | 10-08-2015 03:59 PM | 
| Changes in vizdlg or vizact in Vizard 5? | mape2k | Vizard | 2 | 12-10-2014 06:58 AM | 
| Problem Vizdlg panel draw order | Chapre | Vizard | 1 | 05-17-2011 03:29 PM | 
| vizdlg Panel: Add and remove | disbeat | Vizard | 2 | 02-08-2011 01:44 PM | 
| vizdlg dialog components on a single panel | Chapre | Vizard | 3 | 11-20-2010 03:47 PM |