[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnetlib ChangeLog System.Windows.Forms/ListBox.cs
From: |
Heiko Weiss |
Subject: |
[dotgnu-pnet-commits] pnetlib ChangeLog System.Windows.Forms/ListBox.cs |
Date: |
Mon, 29 Jan 2007 13:13:07 +0000 |
CVSROOT: /sources/dotgnu-pnet
Module name: pnetlib
Changes by: Heiko Weiss <brubbel> 07/01/29 13:13:07
Modified files:
. : ChangeLog
System.Windows.Forms: ListBox.cs
Log message:
fixed painting with forecolor
fixed moving with keys
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnetlib/ChangeLog?cvsroot=dotgnu-pnet&r1=1.2469&r2=1.2470
http://cvs.savannah.gnu.org/viewcvs/pnetlib/System.Windows.Forms/ListBox.cs?cvsroot=dotgnu-pnet&r1=1.17&r2=1.18
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/ChangeLog,v
retrieving revision 1.2469
retrieving revision 1.2470
diff -u -b -r1.2469 -r1.2470
--- ChangeLog 26 Jan 2007 14:32:23 -0000 1.2469
+++ ChangeLog 29 Jan 2007 13:13:07 -0000 1.2470
@@ -1,3 +1,8 @@
+2007-01-29 Heiko Weiss <address@hidden>
+
+ * System.Windows.Forms/ListBox.cs: fixed painting with forecolor,
+ fixed moving with keys.
+
2007-01-26 Heiko Weiss <address@hidden>
* System.Windows.Forms/ListBox.cs: cleanup selection list, if items
changed.
Index: System.Windows.Forms/ListBox.cs
===================================================================
RCS file: /sources/dotgnu-pnet/pnetlib/System.Windows.Forms/ListBox.cs,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- System.Windows.Forms/ListBox.cs 26 Jan 2007 14:32:23 -0000 1.17
+++ System.Windows.Forms/ListBox.cs 29 Jan 2007 13:13:07 -0000 1.18
@@ -37,6 +37,7 @@
private VScrollBar vertScrollbar;
private HScrollBar horizScrollbar;
private ObjectCollection internalDataSource;
+ private SolidBrush mtextBrush;
private SolidBrush backgroundBrush;
private SolidBrush disabledBrush;
private int focusedItem = 0;
@@ -771,6 +772,10 @@
set
{
base.ForeColor = value;
+ if(this.mtextBrush != null ) {
+ this.mtextBrush.Dispose();
+ }
+ this.mtextBrush = new SolidBrush( base.ForeColor );
}
}
@@ -1279,6 +1284,7 @@
this.internalDataSource = this.CreateItemCollection();
base.dataSource = this.internalDataSource;
+ this.mtextBrush = new
SolidBrush(SystemColors.WindowText);
this.backgroundBrush = new SolidBrush(SystemColors.Window);
this.disabledBrush = new SolidBrush(SystemColors.Control);
this.selectedIndices = new SelectedIndexCollection(this);
@@ -1727,7 +1733,7 @@
Rectangle realItemRect = this.GetItemRect(dataIndex);
IList data = (IList) base.dataSource;
- Brush textBrush = SystemBrushes.WindowText;
+ Brush textBrush = this.mtextBrush;
Brush itemBackgroundBrush = this.backgroundBrush;
// Is this item selected?
@@ -1789,7 +1795,7 @@
else
{
backColor = this.BackColor;
- foreColor = SystemColors.WindowText;
+ foreColor = this.ForeColor;
}
realItemRect.Height--;
@@ -2141,6 +2147,16 @@
}
}
+ protected override bool ProcessDialogKey(Keys keyData)
+ {
+ KeyEventArgs evArgs = new KeyEventArgs( keyData );
+ this.OnKeyDown( evArgs );
+ if( !evArgs.Handled ) {
+ return base.ProcessDialogKey(keyData);
+ }
+ return true;
+ }
+
protected override void OnKeyDown(KeyEventArgs e)
{
bool multiEx = (this.selectionMode ==
SelectionMode.MultiExtended);