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 » ArrayCtrl, HeaderCtrl & GridCtrl » Keeping EditString content in gridctrl
Keeping EditString content in gridctrl [message #29880] Fri, 26 November 2010 21:46 Go to next message
BioBytes is currently offline  BioBytes
Messages: 284
Registered: October 2008
Location: France
Experienced Member
Hi friends,

I have a gridctrl which first column could be edited using an EditString object (skillEdit)and other columns using an array of EditIntSpin (levelEdit) :

qsGridCtrl.GetColumn(0).Edit(skillEdit);

for(int i=0;i< qsGridCtrl.GetColumnCount()-1;i++)levelEdit.Add().MinMax(0,3 );

for(int p=1;p< qsGridCtrl.GetColumnCount();p++)qsGridCtrl.GetColumn(p).Edit (levelEdit.At(p-1));

qsGridCtrl.StartEdit();


When edition starts, the content of the cell being edited in EditString disappears. I would like to keep the EditString content in order to modify the string or part of this string. I do nit have this issue with the EditIntSpin objects.

Is anybody has an idea ?

thanks a lot for help

Biobytes
Re: Keeping EditString content in gridctrl [message #30118 is a reply to message #29880] Thu, 09 December 2010 20:38 Go to previous message
BioBytes is currently offline  BioBytes
Messages: 284
Registered: October 2008
Location: France
Experienced Member
Hi

I reply to myself as sometimes some effort given to this marvelous tool that is U++ can lead to solution by oneself. The way is to create a tab of EditString and to assign it to the first column (column 0)to be edited on the selected line :

Array<EditString> editSkill;
Array<EditIntSpin> levelEdit;
editSkill.Add();

for(int i=0;i< qsGridCtrl.GetColumnCount()-1;i++)levelEdit.Add().MinMax(0,3 );

qsGridCtrl.GetColumn(0).Edit(editSkill.At(0));

for(int p=1;p< qsGridCtrl.GetColumnCount();p++)qsGridCtrl.GetColumn(p).Edit (levelEdit.At(p-1));

qsGridCtrl.StartEdit();


That works perfectly so this topic is closed. Hoping this could help other developers.

Regards
Biobytes
Previous Topic: UI virtualization
Next Topic: ArrayCtrl : how to forbid editing of one row ?
Goto Forum:
  


Current Time: Fri Dec 13 07:07:39 CET 2019

Total time taken to generate the page: 0.01291 seconds