[gtkada] How to interrupt the Focus out <-> Focus in event mechanism
Rabbix het Netwerkkeun
stijn at zeus.rug.ac.be
Sun Aug 26 21:34:31 CEST 2001
Hello,
I have an entry field that listens to Focus Out events. Depending on
some criterion, I want to disallow the user to Focus Out this entry field
until some valid value is entered. My current solution is as follows:
function On_File_Entry_Focus_Out_Event
(Object : access File_Selector_Record'Class;
Params : Gtk.Arguments.Gtk_Args) return Boolean is
begin
* if Is_Value_Valid(Object.all) Then
Ada.Text_Io.Put_Line("Valid value in File entry field");
* return True;
else
Ada.Text_Io.Put_Line("Invalid value in File entry field");
Select_File_Entry_Content(Object);
* Set_Focus_Child(Object, Object.File_Entry);
* return False;
end if;
end On_File_Entry_Focus_Out_Event;
Unfortunately this does not work. The focus is directed to another
gui-element that should normally receive the focus(eg by clicking on it;
tabbing out of the entry field,...) and that triggers the fous-out event
on the entry field.
Any idea what I'm doing wrong?
Thanks in foresee,
Stijn
More information about the gtkada
mailing list