[Haskell-beginners] gtk2hs treeViewSetReorderable

news at n-mayr.de news at n-mayr.de
Tue Oct 28 19:33:32 EDT 2008

I undertook a second quest searching the gtk2hs documentation. The  
solution is to have a look at Graphics.UI.Gtk.ModelView.CustomStore.  
On a custom model are all the functions available that get called when  
something interesting happens in the view. Only connect the model to  
the view, that's it. The functions get called on the model and there  
is no need for some external to register call-back functions at the  
view. There's still the possibility for the model to accept call-back  
functions if required.


Zitat von news at n-mayr.de:

> Hello,
> I am using a TreeView from the TreeList package and a ListStore as its
> data model. I set treeViewSetReorderable to True and now rows can be
> drag-n-dropped around. The data in the ListStore gets updated as
> expected.
> I want to get notified, when the order of the elements in the list
> changes (or just, when something is draged around - even if it is
> dropped on the position it was taken from).
> In the documentation it says "..., then the user can reorder the model
> by dragging and dropping rows. The developer can listen to these
> changes by connecting to the model's signals."
> After hours of seaching, I still don't find where I have to connect to.
> Have you any clue?
> Best wishes,
> Nikolas
> Link to documentation:
> http://www.haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-TreeList-TreeView.html#v%3AtreeViewSetReorderable
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

More information about the Beginners mailing list