![]()  | 
	
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
				
				Displaying multiple gui items in one line
			 
			
			
			Hello, 
		
		
		
		
		
		
		
		
	
	I am trying to create a set of sliders with a check box to indicate if the slider is being used. So, I want a check box followed by a slider on the same line. The intention is to have a list of these, and use the check box to indicate if the slider is in use. Is this feasible, and if so, how do I do it? Thanks, Christian  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Here is a simple script that shows how to create a groups of sliders with checkboxes. Hope this helps: 
		
		
		
		
		
		
		
		
	
	Code: 
	import viz viz.go() def addSliderCheckbox(): """Create group node containing slider and checkbox""" group = viz.addGroup(parent=viz.SCREEN) group.slider = viz.addSlider(parent=group) group.checkbox = viz.addCheckbox(parent=group,pos=(0.15,0,0)) return group g1 = addSliderCheckbox() g1.setPosition(0.2,0.5,0) g1.checkbox.set(True) g2 = addSliderCheckbox() g2.setPosition(0.2,0.4,0) g2.slider.set(0.5)  | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Thanks, that is pretty close to perfect!  I don't suppose there is a good way to organize these into a box, like vizinfo allows you to do with some elements? 
		
		
		
		
		
		
		
		
	
	Thanks, Christian  | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			You can use the undocumented vizdlg module to add the items within a panel. Here is a modified version of the script that uses the module: 
		
		
		
		
		
		
		
		
	
	Code: 
	import viz import vizdlg viz.go() panel = vizdlg.Panel(layout=vizdlg.LAYOUT_VERT_LEFT,fontSize=25) panel.setPosition(10,500,0) def addSliderCheckbox(): """Create new row in panel containing slider and checkbox""" row = vizdlg.Panel(layout=vizdlg.LAYOUT_HORZ_CENTER,background=False,border=False) slider = row.addItem(viz.addSlider()) checkbox = row.addItem(viz.addCheckbox()) panel.addItem(row) return slider,checkbox slider1,check1 = addSliderCheckbox() check1.set(True) slider2,check2 = addSliderCheckbox() slider2.set(0.5)  | 
| 
		 
			 
			#5  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			Thanks, that is great! 
		
		
		
		
		
		
		
		
	
	Christian  | 
![]()  | 
	
	
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Create line and vertex | Chrissy2009 | Vizard | 2 | 07-20-2009 11:53 AM | 
| Draw Line between Points | Chrissy2009 | Vizard | 2 | 05-13-2009 05:42 AM | 
| displaying random scenes etc | cl113 | Vizard | 1 | 05-10-2009 06:14 PM | 
| multiple views | durf | Vizard | 3 | 05-07-2009 12:26 PM | 
| Draw Line between Points selected by mouse | Johannes | Vizard | 7 | 01-07-2005 03:50 PM |