wrong accessibility to EvtHandler? error

Questions about wxWidgets running on MS.NET, mono or Portable.NET ? Ask it here !
Post Reply
dibridagoe
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Oct 18, 2006 5:27 pm

wrong accessibility to EvtHandler? error

Post by dibridagoe »

The EvtHandler class has a internal constructor, I think this must be an error since the c++ version has a public constructor.

I need it public or at least protected to be able to do the following:

Code: Select all

    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);
        }
    }
Post Reply