Home » U++ TheIDE » U++ TheIDE: Layout (Forms)  Designer » Child window position 
	
		
		
			| Child window position [message #20565] | 
			Mon, 23 March 2009 15:34   | 
		 
		
			
				
				
				
					
						  
						darthspawn
						 Messages: 58 Registered: February 2009 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		I tried in every way to set the position of a ControlOkCancelLayout, but every time the window is opening at the center of the application. 
SetPos, SetFramePos, SetRect, SetFrameRect... I don't know how to move that window! 
 
The only difference is whent i do a noCenter on the new layout, and it's opening in Top and left part of the monitor, but I can't be able to move it. 
 
Thanks to everyone 
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	
		
		
			| Re: Child window position [message #20567 is a reply to message #20565] | 
			Mon, 23 March 2009 15:52   | 
		 
		
			
				
				
				
					
						  
						mrjt
						 Messages: 705 Registered: March 2007  Location: London
						
					 | 
					Contributor   | 
					 | 
		 
		 
	 | 
 
	
		Are you trying to set the window position before calling CtrlLayout? CtrlLayout calls GetRect, so you must make your changes after it: 
 
	CtrlLayoutOKCancel(*this, "Window title");
	// Set only the size of the window
	Rect r = GetRect();
	r.SetSize(100, 100);
	SetRect(r);
	
	// Set size and position
	SetRect(50, 50, 200, 200);
	NoCenter();  
		
		
		
 |  
	| 
		
	 | 
 
 
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 02:42:20 CET 2025 
 Total time taken to generate the page: 0.05230 seconds 
 |