[Gtk-sharp-list] Entry EditingDone Event

Luciano Callero lnc19@hotmail.com
Fri, 24 Oct 2003 12:35:42 -0300


Thanks This is one of the thinks that i can do. But, It is the EditingDone 
Event correct for this to?

>From: McP <mariano.cano@hispalinux.es>
>To: gtk-sharp <gtk-sharp-list@lists.ximian.com>
>Subject: Re: [Gtk-sharp-list] Entry EditingDone Event
>Date: Fri, 24 Oct 2003 17:30:56 +0200
>MIME-Version: 1.0
>Received: from listsmx.ximian.com ([141.154.95.15]) by mc9-f37.hotmail.com 
>with Microsoft SMTPSVC(5.0.2195.5600); Fri, 24 Oct 2003 08:33:22 -0700
>Received: from headcheese.ximian.com (localhost [127.0.0.1])by 
>listsmx.ximian.com (Postfix) with ESMTPid 7290112422E; Fri, 24 Oct 2003 
>11:33:09 -0400 (EDT)
>Received: by listsmx.ximian.com (Postfix, from userid 38)id BB785124228; 
>Fri, 24 Oct 2003 11:32:06 -0400 (EDT)
>Received: from mail.alu.ua.es (mail.alu.ua.es [193.145.233.9])by 
>listsmx.ximian.com (Postfix) with ESMTP id D8DFF12419Afor 
><gtk-sharp-list@lists.ximian.com>; Fri, 24 Oct 2003 11:31:34 -0400 (EDT)
>Received: from mail.alu.ua.es (mail.alu.ua.es [193.145.233.9])by 
>mail.alu.ua.es (8.9.3p2-20030919/8.9.3) with ESMTP id RAA79190for 
><gtk-sharp-list@lists.ximian.com>; Fri, 24 Oct 2003 17:31:33 +0200
>Received: from allhosts (197.Red-81-33-48.pooles.rima-tde.net 
>[81.33.48.197])by mail.alu.ua.es (8.9.3p2-20030919/8.9.3) with ESMTP id 
>RAA72702for <gtk-sharp-list@lists.ximian.com>; Fri, 24 Oct 2003 17:31:31 
>+0200
>X-Message-Info: vAu4ZEtdRihkDsX8Fzp8HDF4qdnOMHOm
>In-Reply-To: <BAY2-F14wYMDkB4JaXp000096a5@hotmail.com>
>References: <BAY2-F14wYMDkB4JaXp000096a5@hotmail.com>
>Message-Id: <1067009456.436.8.camel@McP>
>X-Mailer: Ximian Evolution 1.4.5 X-Spam-Status: No, hits=-25.9 
>required=5.0tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, 
>      USER_AGENT_XIMIANversion=2.53
>X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.53 
>(1.174.2.15-2003-03-30-exp)
>Sender: gtk-sharp-list-admin@lists.ximian.com
>Errors-To: gtk-sharp-list-admin@lists.ximian.com
>X-BeenThere: gtk-sharp-list@lists.ximian.com
>X-Mailman-Version: 2.0.13
>Precedence: bulk
>List-Help: <mailto:gtk-sharp-list-request@lists.ximian.com?subject=help>
>List-Post: <mailto:gtk-sharp-list@lists.ximian.com>
>List-Subscribe: 
><http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>,<mailto:gtk-sharp-list-request@lists.ximian.com?subject=subscribe>
>List-Id: Discussion of the C# bindings for Gtk+ 
><gtk-sharp-list.lists.ximian.com>
>List-Unsubscribe: 
><http://lists.ximian.com/mailman/listinfo/gtk-sharp-list>,<mailto:gtk-sharp-list-request@lists.ximian.com?subject=unsubscribe>
>List-Archive: <http://lists.ximian.com/archives/public/gtk-sharp-list/>
>Return-Path: gtk-sharp-list-admin@lists.ximian.com
>X-OriginalArrivalTime: 24 Oct 2003 15:33:33.0350 (UTC) 
>FILETIME=[2F002C60:01C39A44]
>
>El vie, 24-10-2003 a las 14:13, Luciano Callero escribió:
> > Someone to help me on this? please?
>
>Don't worry, be happy.
>
>You could store the value when the return key was pressed.
>
>void StoreProperty(object o, KeyPressEventArgs args)
>{
>	Gdk.EventKey key = args.Event;
>	if(key.keyval == (uint) Gdk.Key.Return)
>	{
>		XXX.Property = entry1.Text;
>	}
>}
>
>You must to add a KeyPressEvent to you entry.
>
>
> > >Hi:
> > >
> > >I've a Gtk Window with an Entry Widget. This entry must update a value
> > >(store in a property) after end editing.
> > >I think that the EditingDone event that inherit from other its the 
>correct,
> > >beacause i need to update when is changed in the entry and not when is
> > >change by Programming.
> > >
> > >This is an "Example":
> > >
> > >class Test:Window
> > >
> > >     {
> > >              public string EntryValue = "";
> > >              static void Main()
> > >              {
> > >              Button button1 = new Button("Change The Entry");
> > >               Entry entry1 = new Entry();
> > >
> > >              // All the code that initialize the window
> > >
> > >             button1.Clicked += new EventHandler(button1_clicked);
> > >             entry1.EditingDonde += new 
>EventHandler(entry1_editingdone);
> > >             entry1.OnChange += new  EventHandler(entry1_onchange);
> > >            }
> > >
> > >           public void button1_clicked(System.Object Sender, EventArgs
> > >args)
> > >           {
> > >                     entry1.Text = "Test of Change"; // This must not
> > >update the value
> > >           }
> > >
> > >          public void entry1_editingdone(System.Object Sender, 
>EventArgs
> > >args)
> > >         {
> > >                         // HERE Does Not Enter
> > >                         EntryValue = ((Entry)Sender).Text;
> > >         }
> > >
> > >        public void entry1_onchange(System.Object Sender, EventArgs 
>args)
> > >         {
> > >                       Console.WriteLine("This is shown every time.");
> > >          }
> > >     }
> > >
> > >
> > >I try 3 thinks:
> > >1) Use OnChange event, but the problem was that on every key pressed 
>(every
> > >value that is inserted) in the entry is updated automaticaly, and this 
>will
> > >be very slow, beacause in realy i need to update a Row in a DataTable, 
>and
> > >i must to search some positions and other thinks.
> > >The other and the bigger problem is that, if i change the value of the
> > >entry internaly (like button1) it is fire the event onChange, and i 
>must to
> > >use some "flag" and this is not very efficient. (Not for my)
> > >2) The second idea that i have is to use EditingDone Event, but the 
>problem
> > >is that it is never fires this event. I dont know if i'm using like it 
>is.
> > >
> > >
> > >The finally Question: Do i have to commit suicide? :) Do i need to 
>start
> > >reading again?
> > >Is there an event that is fire when end editing, but before that focus 
>is
> > >lost. Like a Validate (in m$) event?
> > >I'm using correctly the EditingDone Event?
> > >
> > >Thanks in advance.
> > >
> > >_________________________________________________________________
> > >¿Estás buscando un auto nuevo?  http://www.yupimsn.com/autos/
> > >
> > >_______________________________________________
> > >Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> > >http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> >
> > _________________________________________________________________
> > ¿Estás buscando un auto nuevo?  http://www.yupimsn.com/autos/
> >
> > _______________________________________________
> > Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>--
>McP <mariano.cano@hispalinux.es>
>
>_______________________________________________
>Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

_________________________________________________________________
Consigue aquí las mejores y mas recientes ofertas de trabajo en América 
Latina y USA: www.yupimsn.com/empleos