Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
lucpolak is currently offline  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
http://www.virtualsofts.com/img/afterloading.PNG

on run-time : (the designation cell contains test\n test2...)
GetLineCount returns 2 and CYSTEP is 15

http://www.virtualsofts.com/img/runtime.PNG

Lucas

[Updated on: Sun, 04 May 2008 23:11]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Margin / Spacing of buttons
Next Topic: A main modeless window
Goto Forum:
  


Current Time: Sun Jun 08 00:55:54 CEST 2025

Total time taken to generate the page: 0.06157 seconds