[Gtk-sharp-list] On a ListStore moving items on the list... some questions!

fpiraneo fpiraneo at iface.ch
Sat May 22 14:44:49 EDT 2010



Christopher David Howie wrote:
> 
> On 05/21/2010 05:13 AM, fpiraneo wrote:
>> Chris, do you think we have to file a bug on the GTK# bugzilla?
> 
> That would be a good place to start, yeah.  If there is a workaround
> then you should find out from the developers.
> 

The bug has been filed; follows my workaround!

Bye!
Francesco


		protected virtual void onMoveSelectedOnBottom (object sender,
System.EventArgs e)
		{
			TreeIter stIter, stDestIter;
			
			TreeRowReference[] stRowsToMove = GetReferencesFromSelection(ref
tvSelected);

			lsPagesSelected.GetIterFromString(out stDestIter,
(Convert.ToUInt16(lsPagesSelected.IterNChildren()) - 1).ToString());
			
			for(int iIterator = (stRowsToMove.Length - 1); iIterator >= 0;
iIterator--)
			{
				lsPagesSelected.GetIter(out stIter, stRowsToMove[iIterator].Path);
				lsPagesSelected.MoveAfter(stIter, stDestIter);
			}
		}
		
		protected virtual void onMoveSelectedOnTop (object sender,
System.EventArgs e)
		{
			TreeIter stIter, stDestIter;
			
			TreeRowReference[] stRowsToMove = GetReferencesFromSelection(ref
tvSelected);

			lsPagesSelected.GetIterFromString(out stDestIter, "0");
			
			for(int iIterator = 0; iIterator < stRowsToMove.Length; iIterator++)
			{
				lsPagesSelected.GetIter(out stIter, stRowsToMove[iIterator].Path);
				lsPagesSelected.MoveBefore(stIter, stDestIter);
			}
		}
-- 
View this message in context: http://mono.1490590.n4.nabble.com/On-a-ListStore-moving-items-on-the-list-some-questions-tp2222829p2227359.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.


More information about the Gtk-sharp-list mailing list