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

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

[Dotgnu-pnet-commits] pnetlib/System.Windows.Forms FileDialog.cs, 1.4, 1


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnetlib/System.Windows.Forms FileDialog.cs, 1.4, 1.5 ScrollBar.cs, 1.12, 1.13
Date: Sat, 22 Nov 2003 05:02:18 +0000

Update of /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms
In directory subversions:/tmp/cvs-serv23831/System.Windows.Forms

Modified Files:
        FileDialog.cs ScrollBar.cs 
Log Message:


Add some icon list infrastructure to the file dialog; fix a bug in detection
of non-trivial changes to scrollbar foreground and background colors.


Index: FileDialog.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/FileDialog.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FileDialog.cs       14 Nov 2003 07:30:18 -0000      1.4
--- FileDialog.cs       22 Nov 2003 05:02:14 -0000      1.5
***************
*** 355,358 ****
--- 355,396 ----
        public event CancelEventHandler FileOk;
  
+       // List box like control that manages a group of file icons.
+       private sealed class FileIconListBox : Control
+       {
+               // Internal state.
+               private HScrollBar scrollBar;
+ 
+               // Constructor.
+               public FileIconListBox()
+                               {
+                                       // Set the appropriate style properties 
for this control.
+                                       ForeColor = SystemColors.WindowText;
+                                       BackColor = SystemColors.Window;
+                                       BorderStyleInternal = 
BorderStyle.Fixed3D;
+ 
+                                       // Create the horizontal scroll bar and 
position it.
+                                       scrollBar = new HScrollBar();
+                                       scrollBar.ForeColor = 
SystemColors.ControlText;
+                                       scrollBar.BackColor = 
SystemColors.Control;
+                                       scrollBar.Visible = false;
+                                       scrollBar.Dock = DockStyle.Bottom;
+                                       Controls.Add(scrollBar);
+                               }
+ 
+               // Lay out the control after a change in contents.
+               public void LayoutControl()
+                               {
+                                       // TODO
+                               }
+ 
+               // Handle a layout request from the parent class.
+               protected override void OnLayout(LayoutEventArgs e)
+                               {
+                                       base.OnLayout(e);
+                                       LayoutControl();
+                               }
+ 
+       }; // class FileIconListBox
+ 
        // Form that defines the UI of a file dialog.
        private sealed class FileDialogForm : Form
***************
*** 363,367 ****
                private HBoxLayout hbox;
                private GridLayout grid;
!               private ListBox listBox;
                private ComboBox directory;
                private Button upButton;
--- 401,405 ----
                private HBoxLayout hbox;
                private GridLayout grid;
!               private FileIconListBox listBox;
                private ComboBox directory;
                private Button upButton;
***************
*** 386,390 ****
                                        vbox.Dock = DockStyle.Fill;
                                        hbox = new HBoxLayout();
!                                       listBox = new ListBox();
                                        grid = new GridLayout(3, 2);
                                        grid.StretchColumn = 1;
--- 424,428 ----
                                        vbox.Dock = DockStyle.Fill;
                                        hbox = new HBoxLayout();
!                                       listBox = new FileIconListBox();
                                        grid = new GridLayout(3, 2);
                                        grid.StretchColumn = 1;

Index: ScrollBar.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/ScrollBar.cs,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ScrollBar.cs        2 Nov 2003 22:14:38 -0000       1.12
--- ScrollBar.cs        22 Nov 2003 05:02:15 -0000      1.13
***************
*** 76,80 ****
                set
                {
!                       if (value == base.BackColor) { return; }
                        base.BackColor = value;
                        Draw();
--- 76,80 ----
                set
                {
!                       if (value == base.backColor) { return; }
                        base.BackColor = value;
                        Draw();
***************
*** 138,142 ****
                set
                {
!                       if (value == base.ForeColor) { return; }
                        base.ForeColor = value;
                        Draw();
--- 138,142 ----
                set
                {
!                       if (value == base.foreColor) { return; }
                        base.ForeColor = value;
                        Draw();





reply via email to

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