wrong accessibility to EvtHandler? error

Questions about wxWidgets running on MS.NET, mono or Portable.NET ? Ask it here !
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

Postby dibridagoe » Wed Oct 18, 2006 5:39 pm

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

Return to “wx.NET”

Who is online

Users browsing this forum: No registered users and 1 guest