Dani
I made a new project and copied your code into it.
It's thowing an error when it hits line 5
It says Class 'ButtonGroup' Not Found
Am I missing something here? Is there a class that has to be defined?
Later .......................
OK .. Got it to work . Thanks
Had to change it as below.
-------------------------------------------------------
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
Option Explicit
Dim tmpGroupFile As VB#VBMenuGroup = Me.MenuBar.createMenuGroup(Nothing, "File", "File", True)
Dim rbtn1Group As VB#VBMenuGroup = Me.MenuBar.createMenuGroup(tmpGroupFile, "RadioButton", "RadioButton",True)
Dim rbtn1 As Javax#swing#ButtonGroup = Me.MenuBar.createRadioButtonMenu(rbtn1Group, "rbtn1","Yes", True, True)
Dim rbtn2 As Javax#swing#ButtonGroup = Me.MenuBar.createRadioButtonMenu(rbtn1Group, "rbtn2","No", False)
Public Sub Form_MenuClick(MenuItem As VB#IMenuItem)
Select Case MenuItem.ControlID
Case "rbtn1"
rbtn2.clearSelection
Case "rbtn2"
rbtn1.clearSelection
End Select
MsgBox "Caption: " & MenuItem.Caption & " - ControlID: " & MenuItem.ControlID
End Sub
|
-------------------------------------
This works great ... Thanks Again