[Gtk-sharp-list] Prevent focus in panels.

Luciano _ lnc19 at hotmail.com
Mon Feb 5 18:02:46 EST 2007

I cannot make it work: I use

Widget[] FocusWidget = new Widget[2];
Focused[0] = FirstTreeView;
Focused[1] = SecondTreeView;
MyWindow.FocusChain = FocusWidget;

Is this the correct way?


>From: Peter Johanson <latexer at gentoo.org>
>To: gtk-sharp-list at lists.ximian.com
>Subject: Re: [Gtk-sharp-list] Prevent focus in panels.
>Date: Mon, 5 Feb 2007 09:42:50 -0800
>MIME-Version: 1.0
>Received: from lists.ximian.com ([]) by 
>bay0-mc8-f23.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Mon, 5 
>Feb 2007 09:43:03 -0800
>Received: from galactus.ximian.com (localhost.localdomain [])by 
>lists.ximian.com (Postfix) with ESMTP id A98F61CFBFB;Mon,  5 Feb 2007 
>14:09:04 -0500 (EST)
>Received: from herald.ximian.com (frontgate.ximian.com [])by 
>lists.ximian.com (Postfix) with ESMTP id 0D9E61CFB9Ffor 
><gtk-sharp-list at lists.ximian.com>;Mon,  5 Feb 2007 14:09:03 -0500 (EST)
>Received: by herald.ximian.com (Postfix, from userid 2601)id 93C7C70042; 
>Mon,  5 Feb 2007 12:42:59 -0500 (EST)
>Received: from mail.cubesearch.com (unknown [])by 
>herald.ximian.com (Postfix) with ESMTP id 02E8370043for 
><gtk-sharp-list at lists.ximian.com>;Mon,  5 Feb 2007 12:42:54 -0500 (EST)
>Received: by mail.cubesearch.com (Postfix, from userid 522)id 07AF1B4153; 
>Mon,  5 Feb 2007 09:42:51 -0800 (PST)
>X-Message-Info: LsUYwwHHNt2kJ3aEvakpnXfBJ6UOXZ2btgahIvD9vKY=
>X-Original-To: gtk-sharp-list at lists.ximian.com
>Delivered-To: gtk-sharp-list at lists.ximian.com
>Mail-Followup-To: gtk-sharp-list at lists.ximian.com
>References: <BAY104-F152C44F70E43BCAC15DE63A6980 at phx.gbl>
>User-Agent: Mutt/1.5.13 (2006-08-11)
>X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on 
>X-Spam-Level: **
>X-Spam-Status: No, score=3.0 required=5.0 
>X-BeenThere: gtk-sharp-list at lists.ximian.com
>X-Mailman-Version: 2.1.8
>Precedence: list
>List-Id: "Discussion of the .Net bindings for 
><http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>,<mailto:gtk-sharp-list-request at lists.ximian.com?subject=unsubscribe>
>List-Archive: <http://lists.ximian.com/pipermail/gtk-sharp-list>
>List-Post: <mailto:gtk-sharp-list at lists.ximian.com>
>List-Help: <mailto:gtk-sharp-list-request at lists.ximian.com?subject=help>
><http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>,<mailto:gtk-sharp-list-request at lists.ximian.com?subject=subscribe>
>Errors-To: gtk-sharp-list-bounces at lists.ximian.com
>Return-Path: gtk-sharp-list-bounces at lists.ximian.com
>X-OriginalArrivalTime: 05 Feb 2007 17:43:03.0964 (UTC) 
>On Mon, Feb 05, 2007 at 04:21:24PM +0000, Luciano _ wrote:
> > Hi!!!
> > I have two TreeViews, 1 button and 1 entry in a Window.
> > I need to only move the focus (with tab key) only in between treeviews, 
> > not to the entry and the button. The only way to get focus on button or
> > entry is to use the mouse. The problem is, that if i set CanDefault to 
> > in entry and button, it prevent to get the focus always, and i cannot 
> > focus this objects.
> > If cannot use FocusOut event beacause if i GrabFocus to the other 
> > it lost always the focus the first one selected and not the other 
> > Is there any way of do this?
>You can use the Gtk.Container.FocusChain property to override this. You
>can see the gtk+ docs for this here:
>Peter Johanson
><latexer at gentoo.org>
>Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com

Consigue aquí las mejores y mas recientes ofertas de trabajo EE.UU. 

More information about the Gtk-sharp-list mailing list