Got an idea for enhancing PureBasic? New command(s) you'd like to see?
			
		
		
			
				
																			
								mikroman 							 
						User 			
		Posts:  11  		Joined:  Sat Sep 11, 2004 2:04 pm 		
		
											Location:  UK 
							
						
		 
		
						
						
													
							
						
									
						Post 
					 
								by mikroman   »  Sun Feb 13, 2005 12:12 am 
			
			
			
			
			Would it be possible to add a feature to the DrawText command so you could restrict your string to a given length in pixels.
For example:
DrawText(Text$,Length)
This way you could restrict your string to say 80 pixels, much more accurate than using the Mid command.  
 
			
			
									
									
						 
		 
				
		
		 
	 
				
			
		
		
			
				
																			
								plouf 							 
						Enthusiast 			
		Posts:  282  		Joined:  Fri Apr 25, 2003 6:35 pm 		
		
											Location:  Athens,Greece 
							
						
		 
		
						
						
						 
			 
													
							
						
									
						Post 
					 
								by plouf   »  Sun Feb 13, 2005 9:20 pm 
			
			
			
			
			you can use Length = TextLength(Text$)  to get the exact lenght of a string before use it ? or you are asking somethink else ?
			
			
									
									Christos
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								mikroman 							 
						User 			
		Posts:  11  		Joined:  Sat Sep 11, 2004 2:04 pm 		
		
											Location:  UK 
							
						
		 
		
						
						
						 
			 
													
							
						
									
						Post 
					 
								by mikroman   »  Sun Feb 13, 2005 10:32 pm 
			
			
			
			
			TextLength only returns the length of the string, it won't help you to restrict how much is printed.
Maybe the answer would be if PB allowed you to set clipping zones on the screen, that way you could restrict text and graphics within that area. Locomotive BASIC on the Amstrac CPC had a similar feature using the Window command. 
 
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								mikroman 							 
						User 			
		Posts:  11  		Joined:  Sat Sep 11, 2004 2:04 pm 		
		
											Location:  UK 
							
						
		 
		
						
						
													
							
						
									
						Post 
					 
								by mikroman   »  Fri Feb 18, 2005 4:53 pm 
			
			
			
			
			I found a way round my problem by using:
ExtTextOut (Windows Gdi32.lib)
This command lets you output text using a clipping zone, it would be nice if PB could add an easier to use version of this for people who either can't, or don't wand to access the Windows OS.   
 
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								Fred 							 
						Administrator 			
		Posts:  18357  		Joined:  Fri May 17, 2002 4:39 pm 		
		
																Location:  France 
							
							
				Contact: 
				
			 
				
		 
		
						
						
						 
			 
													
							
						
									
						Post 
					 
								by Fred   »  Fri Feb 18, 2005 5:13 pm 
			
			
			
			
			I took good note and will probably add a ClipArea() command for clipping all the drawing functions.
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								mikroman 							 
						User 			
		Posts:  11  		Joined:  Sat Sep 11, 2004 2:04 pm 		
		
											Location:  UK 
							
						
		 
		
						
						
						 
			 
													
							
						
									
						Post 
					 
								by mikroman   »  Fri Feb 18, 2005 6:02 pm 
			
			
			
			
			That's great news Fred  
  
PB keeps getting better with each release, keep up the good work.
 
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								Blade 							 
						Enthusiast 			
		Posts:  362  		Joined:  Wed Aug 06, 2003 2:49 pm 		
		
																Location:  Venice - Italy, Japan when possible. 
							
							
				Contact: 
				
			 
				
		 
		
						
						
						 
			 
													
							
						
									
						Post 
					 
								by Blade   »  Fri Feb 18, 2005 6:58 pm 
			
			
			
			
			Go for it!  
 
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								PB 							 
						PureBasic Expert 			
		Posts:  7581  		Joined:  Fri Apr 25, 2003 5:24 pm 		
		
						
						
		 
		
						
						
						 
			 
													
							
						
									
						Post 
					 
								by PB   »  Fri Feb 18, 2005 8:24 pm 
			
			
			
			
			> I took good note and will probably add a ClipArea() command
This is why I love PureBasic.  
  I came from Visual Basic and whenever I sent
an e-mail to 
mswish@microsoft.com  I would NEVER get an answer like that.  
 
			
			
									
									I compile using 5.31 (x86) on Win 7 Ultimate (64-bit). 
"PureBasic won't be object oriented, period" - Fred.