[Top][All Lists]

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

[Pnet-developers] Focus bug

From: Marc Haisenko
Subject: [Pnet-developers] Focus bug
Date: Tue, 22 Mar 2005 13:36:26 +0100
User-agent: KMail/1.7.1

Hi folks,
I've notices that dotGNU/SWF doesn't correctly implement the focus handling: 
if you click on a label or panel it gets the input focus which is nonsense.

Now I'd like to know how to correctly fix this. SWF.Control.CanFocus looks 
like this:

public bool CanFocus
      return (Visible && Enabled && GetStyle(ControlStyles.Selectable));

So by setting ControlStyles.Selectable to false prevents a control from 
receiving the input focus (I've tested this with Label, works as expected).

I guess we now have two options: opt-in or opt-out. Should we specifically 
mark each control that is NOT able to receive the input focus (by doing 
SetStyle(ControlStyles.Selectable, false) in the constructor) or should be 
specifcally mark each control that IS able to receive the input focus ? I'm 
not quite sure how this is implemented in MS .NET, but I guess they mark each 
control that can NOT receive an input focus.


Marc Haisenko
Today is Sweetmorn, the 8th day of Discord in the YOLD 3171

reply via email to

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