Hi Aur,

On 24 March 2012 22:07, Aur Saraf <sonofli...@gmail.com> wrote:

> 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.

You will find that list contributors are usually pretty helpful. I would
suggest that that you start with my blog:
http://wewantarock.wordpress.comWhile it is far from complete, and is
only updated rather sporadically, it
has been written to answer some of the issues I came up against when taking
on wxHaskell as a new maintainer.

For your specific problem with ListCtrl, you may do well to look at the
wxWidgets Programming book. This is (obviously) written for C++, but covers
Virtual ListCtrl (on page 330). There seems to be a downloadable PDF at

Best regards
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
wxhaskell-users mailing list

Reply via email to