Home » U++ Library support » U++ Widgets - General questions or Mixed problems » DocEdit without end line  
	
		
		
			| Re: DocEdit without end line [message #15700 is a reply to message #15699] | 
			Sun, 04 May 2008 23:06    | 
		 
		
			
				
				
				
					
						  
						lucpolak
						 Messages: 18 Registered: April 2008  Location: France
						
					 | 
					Promising Member  | 
					 | 
		 
		 
	 | 
 
	
		I have another problem with DocEdit/ArrayCtrl mix. 
 
I uses a DocEdit Ctrl in cells of ArrayCtrl. I want to resize the cell containing the data of DocEdit when entering text. 
For example, when adding new lines with enter key. 
 
To do this, i use the Callback for WhenAction on this control.  
   de <<= THISBACK(ResizeListe); 
 
When data changes, the callback is correctly called. the callback function is :  
 
		void FicheDossier::ResizeListe() 
		{ 
			for (int i=0;i<ListeDesc.GetCount();i++) 
			{ 
				DocEdit &de = ListeDesc[i]; 
				 
				String val = de.GetData(); 
				int numLignes = de.GetLineCount(); 
								 
				de.SetRectY(0,numLignes*CYSTEP+1); 
				de.RefreshLayout(); 
				m_ListeElements.SetLineCy(i,numLignes*CYSTEP+1); 
				 
			} 
			 
			m_ListeElements.RefreshLayout(); 
		} 
 
The GetLineCount works fine, I prompted the value of numLignes after calling GetLineCount and its ok. The problem seems to be with the function SetLineCy. After this method is called, there are no changes... Can you known why ? 
 
Last think, i call this function on loading data and the cells are correctly resized with data loaded. 
 
ex : after loading : the cells is correctly resized  
  
 
on run-time : (the designation cell contains test\n test2...) 
GetLineCount returns 2 and CYSTEP is 15 
 
  
 
Lucas
		
		
		[Updated on: Sun, 04 May 2008 23:11] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 05:25:16 CET 2025 
 Total time taken to generate the page: 0.04386 seconds 
 |