in reply to how can i be in the same entry if my validation fails in Tk?

... I need the cursor to be in the same entry if the validation fails ...

If you want some widget to have the blinking cursor call the focus method

See Tk::focus and Tk::grab

  • Comment on Re: how can i be in the same entry if my validation fails in Tk? (blinking cursor is Tk::focus)

Replies are listed 'Best First'.
Re^2: how can i be in the same entry if my validation fails in Tk? (blinking cursor is Tk::focus)
by yedukondalu (Acolyte) on Nov 25, 2015 at 09:03 UTC

    Thanks for the reply..$entry->focus() worked here.. But when I am focusing out from second entry if validation fails both 2nd and 3rd messageboxes are popping at a time ..Even function for both are different.

      But when I am focusing out from second entry if validation fails both 2nd and 3rd messageboxes are popping at a time ..Even function for both are different.

      :) Thats fantastic isn't it? A program doing what you told it to do?