Bugzilla – Attachment 171266 Details for
Bug 323190
Focus issues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
Repro
test.cs (text/plain), 3.72 KB, created by
Thomas Wiest
on 2007-01-11 21:51:00 UTC
(
hide
)
Description:
Repro
Filename:
MIME Type:
Creator:
Thomas Wiest
Created:
2007-01-11 21:51:00 UTC
Size:
3.72 KB
patch
obsolete
>using System; >using System.Drawing; >using System.Globalization; >using System.Windows.Forms; > >class MainForm : Form >{ > public MainForm () > { > // > // _linkLabel > // > _linkLabel = new LinkLabel (); > _linkLabel.Location = new Point (8, 8); > _linkLabel.Text = "1234567890"; > _linkLabel.GotFocus += new EventHandler (LinkLabel_GotFocus); > _linkLabel.LostFocus += new EventHandler (LinkLabel_LostFocus); > Controls.Add (_linkLabel); > // > // _resetButton > // > _resetButton = new Button (); > _resetButton.Location = new Point (385, 8); > _resetButton.Size = new Size (60, 20); > _resetButton.Text = "Reset"; > _resetButton.Click += new EventHandler (ResetButton_Click); > Controls.Add (_resetButton); > // > // _eventsText > // > _eventsText = new TextBox (); > _eventsText.Multiline = true; > _eventsText.Location = new Point (8, 40); > _eventsText.Size = new Size (435, 200); > _eventsText.ScrollBars = ScrollBars.Vertical; > Controls.Add (_eventsText); > // > // _tabControl > // > _tabControl = new TabControl (); > _tabControl.Dock = DockStyle.Bottom; > _tabControl.Height = 450; > _tabControl.TabIndex = 1; > _tabControl.GotFocus += new EventHandler (TabControl_GotFocus); > _tabControl.LostFocus += new EventHandler (TabControl_LostFocus); > Controls.Add (_tabControl); > // > // _bugDescriptionText1 > // > _bugDescriptionText1 = new TextBox (); > _bugDescriptionText1.Multiline = true; > _bugDescriptionText1.Dock = DockStyle.Fill; > _bugDescriptionText1.ScrollBars = ScrollBars.Vertical; > _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, > "Steps to execute:{0}{0}" + > "1. Click the Reset button.{0}{0}" + > "2. Click on the leaf of tab #1.{0}{0}" + > "3. Click on the link of the LinkLabel control.{0}{0}" + > "4. Click on the leaf of tab #1.{0}{0}" + > "Expected result:{0}{0}" + > "1. On step 2, focus rectangle is drawn inside the leaf of tab " + > "#1.{0}{0}" + > "2. On step 3:{0}{0}" + > " * Focus rectangle is no longer drawn inside the leaf of " + > "tab #1.{0}" + > " * Focus rectangle is drawn around the LinkLabel control.{0}{0}" + > "3. On step 4:{0}{0}" + > " * Focus rectangle is no longer drawn inside the leaf of " + > "tab #1.{0}" + > " * Focus rectangle is no longer drawn around the LinkLabel " + > "control.{0}{0}" + > "4. The following events have fired;{0}{0}" + > " * TabControl => GotFocus{0}" + > " * TabControl => LostFocus{0}" + > " * LinkLabel => GotFocus{0}" + > " * LinkLabel => LostFocus{0}" + > " * TabControl => GotFocus{0}", > Environment.NewLine); > // > // _tabPage1 > // > _tabPage1 = new TabPage (); > _tabPage1.Text = "#1"; > _tabPage1.Controls.Add (_bugDescriptionText1); > _tabControl.Controls.Add (_tabPage1); > // > // MainForm > // > ClientSize = new Size (450, 700); > Text = "bug #80501"; > } > > static void Main () > { > Application.Run (new MainForm ()); > } > > private void ResetButton_Click (object sender, EventArgs e) > { > _eventsText.Text = string.Empty; > } > > private void LinkLabel_GotFocus (object sender, EventArgs e) > { > _eventsText.AppendText ( > "LinkLabel => GotFocus" + > Environment.NewLine); > } > > private void LinkLabel_LostFocus (object sender, EventArgs e) > { > _eventsText.AppendText ( > "LinkLabel => LostFocus" + > Environment.NewLine); > } > > private void TabControl_GotFocus (object sender, EventArgs e) > { > _eventsText.AppendText ( > "TabControl => GotFocus" + > Environment.NewLine); > } > > private void TabControl_LostFocus (object sender, EventArgs e) > { > _eventsText.AppendText ( > "TabControl => LostFocus" + > Environment.NewLine); > } > > private LinkLabel _linkLabel; > private Button _resetButton; > private TextBox _eventsText; > private TextBox _bugDescriptionText1; > private TabControl _tabControl; > private TabPage _tabPage1; > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 323190
: 171266