◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── ' This example displays a status bar message when a button in an option group ' gets the focus. ' To try this example: ' 1. Choose New Project from the File menu ' 2. Choose New Form from the File menu to create a form with: ' • Two option buttons ' • Label control ' 3. Set the CtlName property for both option buttons to "OptionGroup" ' 4. Press Alt+F4 to return to the programming environment ' 5. Copy the code example below to the form module ' 6. Press F5 to run the example SUB OptionGroup_GotFocus (Index AS INTEGER) SELECT CASE Index CASE 0 Label1.Caption = "Option 1 has the focus." CASE 1 Label1.Caption = "Option 2 has the focus." END SELECT END SUB SUB OptionGroup_LostFocus (Index AS INTEGER) Label1.Caption = "" END SUB