No such thing as a small change | |
PerlMonks |
Re^10: Tk::Entry and double-Tab key weirdnessby atreyu (Sexton) |
on Jun 04, 2012 at 15:53 UTC ( [id://974319]=note: print w/replies, xml ) | Need Help?? |
Instead of eventGenerate, maybe try looping thru all Entries using $entry->focusForce?
i tried that before, to no avail - at least the way I implemented it:
It will force the focus thru all 6 fields, to be sure, and will highlight bad input entries, but will not halt the tab on the first (or any) failed input field. Try this code: thanks for that (your tab ordering code), i will test it. Monks usually look thru the Notes section, below SOPW, and see if there is a reply which they are interested in. Maybe Perlmonks could do a Facebook-like hack and charge $2 bucks to keep your reply to the top of the list. :-)hah! thanks for the heads up. i do love this forum, but i do not love the interface. i usually depend on a "perlmonks <question>" google search more than using the actual website. but it is good to know the M.O. of the monks. Your best bet to get more monks to look at your problem, especially after making major code modifications, is to post a new SOPW node, and mention this node as a reference. I mentioned that entry validation is very hard to deal with correctly, and your code now has become quite complex. That probably scares off the casual monk. You should try to make smaller examples which only demonstrate one of the glitches you are running into, if you want more viewers.yes, you're right, of course. btw, i included the whole code as a reference, in case anybody else was wanting to do something like this (has helped me in the past when others have done so). P.S. As I was considering all your difficulties, and musing how I might tackle it, I came up with an idea which may help you. Instead of relying totally on the validated entry widget to hold all the correct entry data, why not put a parallel set of read-only Entry widgets( or properly packed set of Label widgets ) aligned right on top of your current widget set. The idea would be that as valid entry text is detected, the corresponding Label would change, and you would be focused to the next invalid Label and it's corresponding validation Entry widget. You would put all your -textvariable data into the Labels, and test them for validity with your own routine, and change bg color for each invalid value. Then you would use the validation Entries solely for entering values to be placed in the Labels, if valid. The user would know they are done, when all the Labels have white background instead of hotpink. :-)That's not a bad idea...i'll consider that. Thanks for all you help and suggestions, and sticking w/my tedious problems, zentara!
In Section
Seekers of Perl Wisdom
|
|