bugDotGNU Portable.NET - Bugs: bug #13970, Child gets no focus, when clicking...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #13970: Child gets no focus, when clicking on UserControl

Submitter:  Peter Flaig <fliege>
Submitted:  Fri 29 Jul 2005 10:24:34 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  darkdust
Open/Closed:  Closed

Mon 22 Aug 2005 11:52:59 AM UTC, comment #2: 

I've checked in UserControl.cs 1.4 where I used Peters approach. I don't think this is the correct solution, but after investigating focusing/selecting (SelectNextControl,Select) I really don't know what the correct solution looks like... that stuff is very obscure. I've written a small test application and it now behaves the same under Windows and dotGNU, so while I don't think that the solution is correct the behavior at least seems to be.

Marc Haisenko <darkdust>
Group Member
Thu 18 Aug 2005 12:21:42 PM UTC, comment #1: 

The zip archive attached appears to be invalid or corrupt.  Can you please redo?

Deryk Robosson <drobosson>
Group Member
Fri 29 Jul 2005 10:24:34 AM UTC, original submission:  

In MS.Net the first focusable child gets the focus, when the user clicks on a UserControl and the focus isn't already on the UserControl or on one of its childs.

This is my workaround:

class MyControl : Windows.Forms.UserControl
{
  protected override void OnMouseDown(MouseEventArgs e)
  {
    if(this.ActiveControl == null)
    {
      SelectNextControl(null, true, true, true, false);
    }
    base.OnMouseDown(e);
  }
}

Peter Flaig <fliege>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #3294:  Focus.zip added by fliege (5KiB - application/x-zip-compressed)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-08-22 darkdust StatusNeed Info Fixed
    Assigned toNone darkdust
    Open/ClosedOpen Closed
2005-08-18 drobosson StatusNone Need Info
2005-07-29 fliege Attached File- Added Focus.zip, #2760

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code