On 24 March 2012 22:07, Aur Saraf <email@example.com>
I need a ListCtrl that I can edit and not only append to. That means
either a version of appendItem that takes an index that I've missed, a
way to get and later set the scroll-state of a ListCtrl (and then I
can just reset all items on every edit) or a way to use the
wxLC_VIRTUAL style available in C++ wxWidgets.
For your purposes, the wrapper of ListCtrl in Graphics.UI.WX.Controls is probably not going to do everything you will need it to. You will likely need to drop down to the lower level API in wxcore.
If you look in Graphics.UI.WXCore.WxcClassesAL, you will find a pretty complete binding to all of the functions in the wxWidgets C++ API. These all start with listCtrl in their names, and are pretty much exact Haskell representations of the C++ API functions. As an example, wxListCtrl::InsertItem() becomes listCtrlInsertItem in Haskell. For functions which have overloads in C++ (as this example does), you will find that there are several variants of listCtrlInsertItem which have slightly different names - the choice of which should be reasonably obvious.
Because the functions in the wxcore API are so closely related to the C++ API, the good news is that you can more or less just translate any sample code for C++ into Haskell. The bad news is that it feels a lot like programming in C++.
Also, as I said in the title, I'd really appreciate if someone could
take some time to be available for a few beginner questions on some
chat or email platform. I find that wxHaskell has too much lore for me
to learn without an experienced hand guiding me. I promise to research
every question before I resort to asking my mentor.