Author: gert
Date: 2007-06-09 10:03:45 -0400 (Sat, 09 Jun 2007)
New Revision: 79046
Added:
trunk/gert/interactive/bug81838/
trunk/gert/interactive/bug81838/MainForm.cs
trunk/gert/interactive/bug81838/default.build
Modified:
trunk/gert/interactive/known_issues
Log:
Added test for bug #81838.
Added: trunk/gert/interactive/bug81838/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug81838/MainForm.cs 2007-06-09 14:00:19 UTC (rev
79045)
+++ trunk/gert/interactive/bug81838/MainForm.cs 2007-06-09 14:03:45 UTC (rev
79046)
@@ -0,0 +1,148 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+ public MainForm ()
+ {
+ //
+ // _listView
+ //
+ _listView = new ListView ();
+ _listView.AllowColumnReorder = true;
+ _listView.AllowDrop = true;
+ _listView.Dock = DockStyle.Top;
+ _listView.FullRowSelect = true;
+ _listView.HideSelection = false;
+ _listView.Size = new Size (300, 450);
+ _listView.View = View.Details;
+ Controls.Add (_listView);
+ //
+ // MainForm
+ //
+ ClientSize = new Size (510, 400);
+ Location = new Point (175, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "bug #81838";
+ Load += new EventHandler (MainForm_Load);
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ Application.Run (new MainForm ());
+ }
+
+ void MainForm_Load (object sender, EventArgs e)
+ {
+ ColumnHeader header = null;
+
+ header = new ColumnHeader ();
+ header.Text = "";
+ header.Width = 28;
+ _listView.Columns.Add (header);
+
+ header = new ColumnHeader ();
+ header.Text = "Title";
+ header.Width = 102;
+ _listView.Columns.Add (header);
+
+ header = new ColumnHeader ();
+ header.Text = "Checkout by";
+ header.Width = 77;
+ _listView.Columns.Add (header);
+
+ header = new ColumnHeader ();
+ header.Text = "FileName";
+ header.Width = 123;
+ _listView.Columns.Add (header);
+
+ header = new ColumnHeader ();
+ header.Text = "Doctype";
+ header.Width = 72;
+ _listView.Columns.Add (header);
+
+ header = new ColumnHeader ();
+ header.Text = "Archive";
+ header.Width = 80;
+ _listView.Columns.Add (header);
+
+ _listView.BeginUpdate ();
+ _listView.SuspendLayout ();
+
+ for (int i = 1; i < 1000; i++) {
+ ListViewItem item = _listView.Items.Add ("");
+
+ if ((i % 3) == 0)
+ item.ForeColor = Color.DarkRed;
+
+ item.SubItems.Add ("Name 123 123 123 13 123 123 123 "
+ i);
+ item.SubItems.Add ("Test" + i);
+ item.SubItems.Add ("Test 123 123 123 13 123 123 123" +
i);
+ item.SubItems.Add ("Test" + i);
+ item.SubItems.Add ("Test" + i);
+ item.SubItems.Add ("");
+ }
+
+ _listView.ResumeLayout ();
+ _listView.EndUpdate ();
+ //_listView.Height = 600;
+
+ InstructionsForm instructionsForm = new InstructionsForm ();
+ instructionsForm.Show ();
+ }
+
+ private ListView _listView;
+}
+
+public class InstructionsForm : Form
+{
+ public InstructionsForm ()
+ {
+ //
+ // _tabControl
+ //
+ _tabControl = new TabControl ();
+ _tabControl.Dock = DockStyle.Fill;
+ Controls.Add (_tabControl);
+ //
+ // _bugDescriptionText1
+ //
+ _bugDescriptionText1 = new TextBox ();
+ _bugDescriptionText1.Dock = DockStyle.Fill;
+ _bugDescriptionText1.Multiline = true;
+ _bugDescriptionText1.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Steps to execute:{0}{0}" +
+ "1. Press Page-Down until scrolling stops.{0}{0}" +
+ "2. Press Page-Up until scrolling stops.{0}{0}" +
+ "3. Press the Down arrow until scrolling starts.{0}{0}"
+
+ "4. Scroll further down using the mousewheel.{0}{0}" +
+ "Expected result:{0}{0}" +
+ "1. On step 2, the thumb is displayed at the top of the
" +
+ "ScrollBar.{0}{0}" +
+ "2. On steps 3 and 4:{0}{0}" +
+ " * The scrollbar thumb is visible.{0}" +
+ " * No drawing issues for items that are scrolled
into view.",
+ Environment.NewLine);
+ //
+ // _tabPage1
+ //
+ _tabPage1 = new TabPage ();
+ _tabPage1.Text = "#1";
+ _tabPage1.Controls.Add (_bugDescriptionText1);
+ _tabControl.Controls.Add (_tabPage1);
+ //
+ // InstructionsForm
+ //
+ ClientSize = new Size (330, 280);
+ Location = new Point (700, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "Instructions - bug #81838";
+ }
+
+ private TextBox _bugDescriptionText1;
+ private TabControl _tabControl;
+ private TabPage _tabPage1;
+}
Property changes on: trunk/gert/interactive/bug81838/MainForm.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug81838/default.build
===================================================================
--- trunk/gert/interactive/bug81838/default.build 2007-06-09 14:00:19 UTC
(rev 79045)
+++ trunk/gert/interactive/bug81838/default.build 2007-06-09 14:03:45 UTC
(rev 79046)
@@ -0,0 +1,62 @@
+<project name="bug81779" default="rebuild">
+ <target name="mono-1.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+ </target>
+
+ <target name="mono-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+ </target>
+
+ <target name="net-1.1">
+ <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
+ </target>
+
+ <target name="net-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+ </target>
+
+ <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="out" />
+ <include name="test.exe" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="build">
+ <property name="original.targetframework"
value="${nant.settings.currentframework}" />
+
+ <foreach property="framework" item="String" in="${frameworks}"
delim=",">
+ <if test="${framework::exists(framework)}">
+ <property name="nant.settings.currentframework"
value="${framework}" />
+ <call
target="${nant.settings.currentframework}" />
+ <call target="run" />
+ <call target="clean" />
+ </if>
+ </foreach>
+
+ <property name="nant.settings.currentframework"
value="${original.targetframework}" />
+ </target>
+
+ <target name="compile">
+ <csc target="winexe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="MainForm.cs" />
+ </sources>
+ <references>
+ <include name="System.Drawing.dll" />
+ <include name="System.Windows.Forms.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/interactive/bug81838/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/gert/interactive/known_issues
===================================================================
--- trunk/gert/interactive/known_issues 2007-06-09 14:00:19 UTC (rev 79045)
+++ trunk/gert/interactive/known_issues 2007-06-09 14:03:45 UTC (rev 79046)
@@ -91,3 +91,4 @@
bug81800/**
bug81836/**
bug81837/**
+bug81838/**
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches