WPF and initial focus

It seems that when a WPF application starts, nothing has focus. This is really weird. Every other framework I’ve used does just what you’d expect: puts initial focus on the first control in the tab order. But I’ve confirmed that it’s WPF, not just my app — if I create a new Window, and just … Read more

How can I set the focus (and display the keyboard) on my EditText programmatically

I have a layout which contains some views like this: <LinearLayout> <TextView…> <TextView…> <ImageView …> <EditText…> <Button…> </linearLayout> How can I set the focus (display the keyboard) on my EditText programmatically? I’ve tried this and it works only when I launch my Activity normally, but when I launch it in a TabHost, it doesn’t work. … Read more

jQuery lose focus event

I’m trying to show up a container if a input field gets the focus and – that’s the actual problem – hide the container if focus is lost. Is there an opposite event for jQuery’s focus? Some example code: <input type=”text” value=”” name=”filter” id=”filter”/> <div id=”options”>some cool options</div> <script type=”text/javascript”> $(‘#options’).hide(); $(‘#filter’).focus(function() { $(‘#options’).appear(); }); … Read more