wxDC constructor

Questions about wxWidgets running on MS.NET, mono or Portable.NET ? Ask it here !
Post Reply
bart
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Jun 22, 2005 9:41 am

wxDC constructor

Post by bart » Wed Jun 22, 2005 9:57 am

I'm working on a small application for displaying some data. It has to run on both Linux and Windows, so I decided to use C#. .NET Framework 1.1 on Windows and the latest Mono on Linux. I've a small application with some buttons etc and that works fine.

But now I want to add some kind of canvas to display my data. wxDC looks like something very useful for that, but I can't get that working.

Code: Select all

wx.DC dc = new wx.DC ();
According to the wxWidgets reference DC has a constructor without arguments. But when compiling mcs says:
error CS1501: New invocation: Can not find a constructor in `wx.DC' for this argument list
I don't understand that. Doesn't anyone have a working example of a C# program with an wxDC or something similar?

User avatar
Ryan Norton
Moderator
Moderator
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Re: wxDC constructor

Post by Ryan Norton » Mon Jun 27, 2005 12:01 am

Not 100% sure but I'm pretty sure only subclasses of wxDC function.

Use the wxWindow (or canvas) for the constructor - or if you need one without arguments use wxMemoryDC
[Mostly retired moderator, still check in to clean up some stuff]

Post Reply