Em> I don't think that we should have the Zetcode tutorial on the website.
Is it really that bad or does it still have the good parts which would
justify keeping it and just inserting a warning saying that it's
incomplete?
Em> After that I was disappointed because none of the code worked. For
Em> every single example, I had to scrutinize it and correct the bugs,
I didn't try compiling it but at a glance the code at
http://zetcode.com/tutorials/wxwidgetstutorial/menustoolbars/
doesn't seem so wrong to me. What problems exactly did you have?
Thanks,
VZ
Em> My problem was the difference between this
Em> wxBitmap exit(wxT("exit.png")); and this
Em> wxBitmap exit(wxT("exit.png"), wxBITMAP_TYPE_PNG);
Em>
Em> I spent what summed up to a day on that.
Err, there is nothing wrong with the first version. I don't know why
didn't it work for you but it certainly should.
Regards,
VZ
Em> Seriously? I spent like 12 hours on it though, and it worked with the
Em> other one. Did you compile it?
It definitely compiles. And normally it should also work (of course, the
other version should work too but the explicit image type is unnecessary).
If you have a problem with this, please describe it precisely, i.e. ideally
show how to reproduce it in the image sample by providing a patch (please
see http://trac.wxwidgets.org/wiki/HowToSubmitPatches) to it showing the
problem.
Regards,
VZ
On 2010-08-19 10:33, vronskij wrote:
> The simple toolbar example compiled as well. Here I must
> say that I work on Linux. Newest Ubuntu release, wxWidgets version
> 2.8.10.1.
> And I suppose that this toolbar example might not work on Window/Mac.
On 2010-08-19 07:10, evstevemd wrote:
> Sure it is not working!
> But simple use of wxBitmap exit(wxT("exit.png"), wxBITMAP_TYPE_PNG)
> instead of wxBitmap exit(wxT("exit.png")) and adding PNG handler that
> is wxImage::AddHandler(new wxPNGHandler()) did it
my guess is that the second measure (adding a PNG handler) is the
important one, since the "a simple toolbar" toolbar tutorial doesn't
initialise any image handler at all.
(The second tutorial "toolbars" on the same page already does what
evstevemd suggested).
Cheers
Anders