dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnetlib ./ChangeLog System.Windows.Forms/TabCon...


From: Heiko Weiss
Subject: [dotgnu-pnet-commits] pnetlib ./ChangeLog System.Windows.Forms/TabCon...
Date: Mon, 13 Feb 2006 07:44:59 +0000

CVSROOT:        /sources/dotgnu-pnet
Module name:    pnetlib
Branch:         
Changes by:     Heiko Weiss <address@hidden>    06/02/13 07:44:59

Modified files:
        .              : ChangeLog 
        System.Windows.Forms: TabControl.cs 

Log message:
        fixed drawing TabPage first time (bug #15698)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/ChangeLog.diff?tr1=1.2351&tr2=1.2352&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/pnetlib/System.Windows.Forms/TabControl.cs.diff?tr1=1.27&tr2=1.28&r1=text&r2=text

Patches:
Index: pnetlib/ChangeLog
diff -u pnetlib/ChangeLog:1.2351 pnetlib/ChangeLog:1.2352
--- pnetlib/ChangeLog:1.2351    Mon Feb  6 13:52:21 2006
+++ pnetlib/ChangeLog   Mon Feb 13 07:44:59 2006
@@ -1,3 +1,7 @@
+2006-02-13  Heiko Weiss <address@hidden>
+
+       * System.Windows.Forms/TabControl.cs: fixed drawing TabPage first time 
(bug #15698)
+
 2006-02-06  Heiko Weiss <address@hidden>
 
        * System.Drawing/Font.cs: fixed calculating height
Index: pnetlib/System.Windows.Forms/TabControl.cs
diff -u pnetlib/System.Windows.Forms/TabControl.cs:1.27 
pnetlib/System.Windows.Forms/TabControl.cs:1.28
--- pnetlib/System.Windows.Forms/TabControl.cs:1.27     Mon Nov  7 03:25:12 2005
+++ pnetlib/System.Windows.Forms/TabControl.cs  Mon Feb 13 07:44:59 2006
@@ -551,7 +551,6 @@
 
                protected override void OnPaint(PaintEventArgs e)
                {
-
                        Draw(e.Graphics);
                        // Draw the visible TabPage (child controls)
                        base.OnPaint (e);
@@ -1005,7 +1004,17 @@
                        {
                                if (selectedIndex == -1)
                                {
-                                       return 0;
+                                       // if selectedIndex is -1 (none TabPage 
was selected)
+                                       // Check if any TabPage is visible
+                                       // Select first visible TabPage
+                                       int iCount = tabPageCollection.Count;
+                                       for( int i = 0; i < iCount; i++ ) {
+                                               if( 
tabPageCollection[i].Visible ) {
+                                                       SelectedIndex = i;
+                                                       break;
+                                               }
+                                       }
+                                       return selectedIndex;
                                }
                                else
                                {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]