[Mono-winforms-list] Can't get TabControl or MonthCalendar samples to show controls
Peter Dennis Bartok
peter@novonyx.com
Tue, 21 Dec 2004 20:52:53 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_005A_01C4E79F.0A6787F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
John,
The problems result out of a 'fix' I did that prevents windows jumping
around on screen and being resized and such before the app mainloop starts
running. It exposed a bug in Control.CreateParams.
Since svn is on the fritz I've attached a patch in the meantime that will
fix it.
Cheers,
Peter
-----Original Message-----
From: "John BouAntoun" <jba-mono@optusnet.com.au>
To: "Mono-Winforms-List (E-mail)" <mono-winforms-list@ximian.com>
Date: 21 December, 2004 03:18
Subject: [Mono-winforms-list] Can't get TabControl or MonthCalendar samples
to show controls
>Hey guys,
>
>I just svn up'ed after having been offline for about a week.
>
>I had some local changes that were visible last time i worked (a week
>ago), but after svn up'in I can't seem to get the swf-tabcontrol.exe or
>swf-monthcalendar.exe to show the controls.
>
>I saw some commits to libgdiplus, so I update libgdiplus and
>System.Drawing and make installed them. Still no go.
>
>I can get the button and label samples to work, but the tab control and
>monthcalendar samples show nothing.
>
>When I run the tabcontrol sample i get the following output:
>john@ubuntu-1 ~/dev/winforms/tabcontrol $ mono swf-tabcontrol.exe
>done detecting keyboard: United States keyboard layout (phantom key
>version)
>#region #line XplatUI Constructor called
>Exception 'Feature not implemented.
> at System.Drawing.GDIPlus.CheckStatus ()
> at System.Drawing.Graphics.FromHdc ()
> at System.Windows.Forms.Control.WndProc ()
> at System.Windows.Forms.TabControl.WndProc ()
> at System.Windows.Forms.Control+ControlNativeWindow.WndProc ()
> at System.Windows.Forms.NativeWindow.WndProc ()'
>Feature not implemented.
> at System.Drawing.GDIPlus.CheckStatus ()
> at System.Drawing.Graphics.FromHdc ()
> at System.Windows.Forms.Control.WndProc ()
> at System.Windows.Forms.TabControl.WndProc ()
> at System.Windows.Forms.Control+ControlNativeWindow.WndProc ()
> at System.Windows.Forms.NativeWindow.WndProc ()
>
>Any tips about what could be causing this?
>
>JBA
>
>_______________________________________________
>Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
>
------=_NextPart_000_005A_01C4E79F.0A6787F0
Content-Type: application/octet-stream;
name="visible.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="visible.patch"
Index: Control.cs=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
--- Control.cs (revision 38037)=0A=
+++ Control.cs (working copy)=0A=
@@ -460,14 +460,6 @@=0A=
public Control() { =0A=
creator_thread =3D Thread.CurrentThread;=0A=
=0A=
- child_controls =3D CreateControlsInstance();=0A=
- client_size =3D new Size(DefaultSize.Width, DefaultSize.Height);=0A=
- client_rect =3D new Rectangle(0, 0, DefaultSize.Width, =
DefaultSize.Height);=0A=
- XplatUI.CalculateWindowRect(IntPtr.Zero, ref client_rect, =
CreateParams.Style, false, out bounds);=0A=
- if ((CreateParams.Style & (int)WindowStyles.WS_CHILD) =3D=3D 0) {=0A=
- bounds.X=3D-1;=0A=
- bounds.Y=3D-1;=0A=
- }=0A=
prev_size =3D Size.Empty;=0A=
anchor_style =3D AnchorStyles.Top | AnchorStyles.Left;=0A=
=0A=
@@ -487,6 +479,15 @@=0A=
background_image =3D null;=0A=
text =3D string.Empty;=0A=
name =3D string.Empty; =0A=
+=0A=
+ child_controls =3D CreateControlsInstance();=0A=
+ client_size =3D new Size(DefaultSize.Width, DefaultSize.Height);=0A=
+ client_rect =3D new Rectangle(0, 0, DefaultSize.Width, =
DefaultSize.Height);=0A=
+ XplatUI.CalculateWindowRect(IntPtr.Zero, ref client_rect, =
CreateParams.Style, false, out bounds);=0A=
+ if ((CreateParams.Style & (int)WindowStyles.WS_CHILD) =3D=3D 0) {=0A=
+ bounds.X=3D-1;=0A=
+ bounds.Y=3D-1;=0A=
+ }=0A=
}=0A=
=0A=
public Control(Control parent, string text) : this() {=0A=
@@ -1506,7 +1507,7 @@=0A=
=0A=
create_params.Style =3D (int)WindowStyles.WS_CHILD | =
(int)WindowStyles.WS_CLIPCHILDREN | (int)WindowStyles.WS_CLIPSIBLINGS;=0A=
=0A=
- if (Visible) {=0A=
+ if (is_visible) {=0A=
create_params.Style |=3D (int)WindowStyles.WS_VISIBLE;=0A=
}=0A=
=0A=
------=_NextPart_000_005A_01C4E79F.0A6787F0--