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 » Problem with Drag&Drop in ArrayCtrl
Re: Problem with Drag&Drop in ArrayCtrl [message #22585 is a reply to message #22580] Tue, 28 July 2009 14:24 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
The reason that RefreshRow stops working in your example is that the code is wrong. After an item is dragged it is removed from the list, so the imgList index and the ArrayCtrl index no longer match and the code is always refreshing one (or more) line ahead of the row you load the image into.

The timer code should be:
		for (int i = 0; i < a.GetCount(); ++i) {
			int ix = a.Get(i, 0);
			if (!imgLst[ix]) {
				imgLst[ix] = StreamRaster::LoadFileAny("c:\\demo.jpg");
				a.RefreshRow(i);
				return;
			}
		}


I have also tried using UpdateRefresh instead and could find no problems other than some flickering from the frequent refreshes.
I tested this using a moderately recent SVN version.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Substring formating in ArrayCtrl (SqlCtrl)
Next Topic: Right Click on GridCtrl
Goto Forum:
  


Current Time: Fri Jul 18 10:02:48 CEST 2025

Total time taken to generate the page: 0.04240 seconds