[Top][All Lists]

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

how NOT to "focus_out" of an entry ?

From: David Pirotte
Subject: how NOT to "focus_out" of an entry ?
Date: Thu, 11 Oct 2001 12:50:58 +0200

i need to force the user to stay in a particular entry, if and while
the entry does not vlideta a condition, for exemple a valid string
date format

i tried the following, but was unsuccessfull, the system does not
stay on the entry that i wish ot would, the one the user was trying
to get out:

        ;; just for the example
        (define (str-valid-dte? date-str)
        (gtk-signal-connect entry "focus_out_event"
                            (lambda (a)
                              (let ((date-str (gtk-entry-get-text entry)))
                                (if (str-valid-dte? date-str)
                                      (system "beep")
==> is this the correct way?          (gtk-widget-grab-focus entry)

reply via email to

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