From: "Gabor Tjong A Hung" on
Hello there,

the c# version of the EvtHandler class seems to have an
'internal'-accessability constructor, I think this must be an error since
the c++ version has a public constructor. I was wondering if this could be
updated or if there is another way of doing what I want, putting a bitmap as
a background.

I'm not sure if this is the place where I should be, but I've left a message
on the forum for quite some time without any result, I've been bugging
people on irc/freenode and seemed to have gotten no result.

http://wxforum.shadonet.com/viewtopic.php?t=10531

public class wxBackgroundBitmap : wx.EvtHandler
{
protected wx.Bitmap bitmap;
public wxBackgroundBitmap(wx.Bitmap bitmap)
{
this.bitmap = bitmap;
}
public new bool ProcessEvent(wx.Event e){
if(e.EventType == wx.Event.wxEVT_ERASE_BACKGROUND){
wx.EraseEvent eraseEvent = (wx.EraseEvent)e;
eraseEvent.DC.DrawBitmap(bitmap,0,0,false);
return true;
}
else return base.ProcessEvent(e);
}
}
--
Success is dependent on effort.
Sophocles
From: Vadim Zeitlin on
On Sun, 22 Oct 2006 16:05:06 +0200 Gabor Tjong A Hung <gvtjongahung(a)users.sourceforge.net> wrote:

GTAH> the c# version of the EvtHandler class seems to have an
GTAH> 'internal'-accessability constructor, I think this must be an error since
GTAH> the c++ version has a public constructor. I was wondering if this could be
GTAH> updated or if there is another way of doing what I want, putting a bitmap as
GTAH> a background.

Well, you can handle the event in the window class where you want to show
the bitmap.

GTAH> I'm not sure if this is the place where I should be, but I've left a message
GTAH> on the forum for quite some time without any result, I've been bugging
GTAH> people on irc/freenode and seemed to have gotten no result.

I guess you'd have better luck on the dedicated wxC# list, if there is
one.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "Gabor Tjong A Hung" on
Thank you for yor response, however,
handling the event wasn't the problem, creating it was the problem.
You see, if a constructor is internal(even stricter than
public/protected/private), the consturctor code can only be seen by that
class.
Thus making a subclass is impossible since for the outside world the
constructor cannot be called.

and as for the c# mailing list. It doesn't seem to exist, I'm slowly
starting to think that I'm the only wxwidgets.net user


On 10/22/06, Vadim Zeitlin <vadim(a)wxwindows.org> wrote:
>
> On Sun, 22 Oct 2006 16:05:06 +0200 Gabor Tjong A Hung <
> gvtjongahung(a)users.sourceforge.net> wrote:
>
> GTAH> the c# version of the EvtHandler class seems to have an
> GTAH> 'internal'-accessability constructor, I think this must be an error
> since
> GTAH> the c++ version has a public constructor. I was wondering if this
> could be
> GTAH> updated or if there is another way of doing what I want, putting a
> bitmap as
> GTAH> a background.
>
> Well, you can handle the event in the window class where you want to show
> the bitmap.
>
> GTAH> I'm not sure if this is the place where I should be, but I've left a
> message
> GTAH> on the forum for quite some time without any result, I've been
> bugging
> GTAH> people on irc/freenode and seemed to have gotten no result.
>
> I guess you'd have better luck on the dedicated wxC# list, if there is
> one.
>
> Regards,
> VZ
>
> --
> TT-Solutions: wxWidgets consultancy and technical support
> http://www.tt-solutions.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>


--
Success is dependent on effort.
Sophocles