2 bugs in picturebox

"Pedro Cardoso" <[email protected]> Wed, 25 Aug 2004 16:09:03 +0100
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <[email protected]>
Hi,

Bugs:

1) if we remove the line "EVT_SIZE(new wx.EventListener(OnSize));" the
picturebox expands to fill the whole screen
2) the same code on linux doesn't show the picturebox and instead displays
the text "Bitmap"

Code:

using System;
using System.Drawing;
using wx;

namespace WindowsApplication1
{
	public class Form1 : wx.Frame
	{
		private wx.StaticBitmap pictureBox1;

		public const int ID_PICTUREBOX1	= 11;

		void OnSize(object sender, wx.Event e)
		{
		}

		public Form1(string title, System.Drawing.Point pos,
System.Drawing.Size size) : base(title, pos,
size,wx.Window.wxCAPTION|wx.Window.wxCLIP_CHILDREN|
wx.Window.wxRESIZE_BORDER| wx.Window.wxMAXIMIZE_BOX|
wx.Window.wxSYSTEM_MENU|wx.Window.wxCLOSE_BOX|wx.Window.wxMINIMIZE_BOX)
		{

			pictureBox1=new wx.StaticBitmap(this,
ID_PICTUREBOX1,new wx.Bitmap() , new System.Drawing.Point(264, 64), new
System.Drawing.Size(248, 128));
			pictureBox1.BackgroundColour=new
wx.Colour(System.Drawing.Color.White.R,System.Drawing.Color.White.G,System.D
rawing.Color.White.B);
			this.BackgroundColour=new
wx.Colour(System.Drawing.SystemColors.Control.R,System.Drawing.SystemColors.
Control.G,System.Drawing.SystemColors.Control.B);

			// Bind	events
			EVT_SIZE(new wx.EventListener(OnSize));
		}

	}

	// Define a new	application	type, each program should derive a
class from App
	public class MyApp : wx.App
	{

		public override bool OnInit()
		{
			Form1 frame = new Form1("Form1",
wx.Window.wxDefaultPosition, new System.Drawing.Size(668,460));
			frame.Show(true);
			return true;
		}

		[STAThread]
		static void Main()
		{
			MyApp app = new MyApp();
			app.Run();
		}
	}
}




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285