BB___SETFOCUS

=SETFOCUS= toc

Description
> This causes Windows to give //input focus// to this control. This means that, if some other control in the same window was highlighted and active, this control now becomes the highlighted and active control, receiving mouse and keyboard input.

Syntax

 * 1) controlType #handle.ext "setfocus"
 * 2) controlType #handle.ext "!setfocus"

Hints
> Controls with captions, or that can receive text input, have an exclamation point (!) preceding the "setfocus" command. The exclamation point distinguishes a command from the text or caption.

Example
code format="lb" nomainwin statictext #1.st1 "This example shows the use of setfocus.", 10, 10, 200, 25 button #1.btn1 "Press Enter key", [quit], UL, 80, 150

open "Setfocus Demo" for window as #1 #1 "trapclose [quit]"

#1.btn1 "!setfocus"

wait

[quit] close #1 end code

Useful Functions
code format="lb" Place a useful function using this keyword here code