Questions tagged [setfocus]

For questions related to the SetFocus method, which moves the focus to the specified form or Window.

The SetFocus method moves the focus to the specified Form, the specified control on the Form/Window, or to the specified Window. You can use the SetFocus method when you want a particular field or control or Window to have the focus so that all user input is directed to this object.

430 questions
6
votes
2 answers

How to set focus using jQuery on an element that has just appeared

I have a document ready block as follows: $(document).ready(function () { $('#addTagLink').click(function () { $('#addTagField').show(); $('#addTagField').val(""); $('#addTagField').focus(); }); }); The addTagField…
DaFoot
  • 1,475
  • 8
  • 29
  • 58
6
votes
3 answers

backbone.js: set focus to input after render

I have a Model that has 1 input. Also, I have a Collection. Now, when I add a model to the collection, I want to set the focus to it's input. To be precise, I need to set the focus on the newly created model view's input. However, I can't seem to…
ragulka
  • 4,312
  • 7
  • 48
  • 73
6
votes
4 answers

TEdit focus & caret

I got two TEdit controls. When I tab out of edit1, edit2 receives the focus. On my OnExit event of Edit1 I have the following code: procedure TForm1.Edit1Exit(Sender: TObject); begin edit2.Enabled := false; edit2.Enabled := true; …
Rick
  • 1,301
  • 1
  • 16
  • 28
6
votes
5 answers

How to deselect textbox if user clicks elsewhere on the form?

Currently in my application it is impossible to deselect a textbox. The only way is to select another textbox. My users and I agree that clicking anywhere else on the form should deselect the current textbox. I tried overriding the MouseDown on many…
John Smith
  • 8,567
  • 13
  • 51
  • 74
6
votes
1 answer

DevExpress XtraGrid set FocusedRowHandle and then scroll focused row into view?

I have an XtraGrid with ~500 rows in it. I can set the FocusedRowHandle to, say, row 245. But is there a method that will scroll that now-focused row into view if it's currently not visible? DevExpress.XtraGrid.Views.Base.ColumnView vw; vw =…
Tim
  • 8,669
  • 31
  • 105
  • 183
6
votes
2 answers

Is there any way to hide keyboard when focusing an ion-input?

I wanted to have an ion-input that will be focused and the keyboard should not appear. Is there any way or is it possible? Thank you!
Ace
  • 71
  • 1
  • 5
6
votes
3 answers

Android , Admob / Adview takes|steals focus from edittext , How to prevent?

I am creating views and add these views to a linearlayout , These input is taken from edittext at the bottom of the screen like a messanger application. Whenever i push the 'done' button it triggers and add that message to that message linearlayout.…
Suat KARAKUSOGLU
  • 622
  • 6
  • 14
6
votes
5 answers

Set the focus to a HTML Textbox or Button in a WebBroswer control

I am opening a website in a WebBrowser control using VB.NET 2008. On the fourth page of the website, I want to focus the control by triggering the tab key programmatically. I am using the following code: If adtxt.Text =…
user1473832
  • 79
  • 2
  • 4
  • 8
5
votes
1 answer

P/Invoke SetFocus to a particular control

Is it possible to set focus on another application's textbox (using its ClassName). I have the window handle as an IntPtr. But just need some guidance as to what functions/APIs are available for this! Issue is, I use the SetForegroundWindow API to…
Jordan
  • 1,390
  • 2
  • 9
  • 24
5
votes
3 answers

VBScript set focus on a window in IE

I'm updating an old piece of code that uses VBScript to pull up a window in IE. For some reason, it likes to open up behind IE. Google gave me the following couple lines for setting window focus in VBScript: set WshShell =…
jtpereyda
  • 6,987
  • 10
  • 51
  • 80
5
votes
4 answers

Set input field focus on start typing

I am looking for a way to be able to start typing on a website without having selected anything and then have a specific input field in focus. Google also employs this feature. In their search results you can click anywhere (defocus the search…
baik
  • 993
  • 2
  • 14
  • 21
5
votes
0 answers

Changing the focus back to the console window

My knowledge of Windows programming is close to zero. But now I have made a Forth program running from the console in Windows which opening a primitive window for graphics. The problem is that I want to control the program by pressing keys, but when…
Lehs
  • 812
  • 6
  • 18
5
votes
3 answers

wpf problem with setting focus

Hi I'm not able to set focus on parent of control. I have a control which is placed on canvas. If I click that control I need to set focus on canvas in order to handle some keyboard events. However despite the fact that I was trying to set focus…
george
  • 51
  • 1
  • 1
  • 2
5
votes
1 answer

Setting focus to the address bar using a firefox extension

I'm developing an extension that requires to set focus to the address bar at some point. I've been trying to RTFM, but the FM is so hard to read! Does anyone know of any way to set focus to the address bar from within a firefox extension? TIA.
Rakesh Pai
  • 26,069
  • 3
  • 25
  • 31
5
votes
1 answer

Android Camera Api 2 Manual focus with touch

I want to to make camera app with touch focus, but i am little confused with the camera api 2. I have read about LENS_FOCUS_DISTANCE but i don't understand how to use it. Can you please assist? Thank you in advance and wish you nice weekend!
user3450687
  • 329
  • 4
  • 17
1 2
3
28 29