Default value for radio button [message #516837] |
Thu, 25 February 2010 05:32  |
Eclipse User |
|
|
|
I have a menu with a sub menu that contains three radio buttons. I want the third of the radio buttons checked by default (i.e. at program start). However, all three radio buttons are checked.
This is a snippet from my plugin.xml:
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu">
<menu
id="viewMenu"
label="View">
<menu
id="navigationMenu"
label="Connections">
<command
commandId="myApp.commands.navigationAll"
label="snap to road"
style="radio">
<parameter
name="org.eclipse.ui.commands.radioStateParameter"
value="all">
</parameter>
</command>
<command
commandId="myApp.commands.navigationNone"
label="direct connection"
style="radio">
<parameter
name="org.eclipse.ui.commands.radioStateParameter"
value="none">
</parameter>
</command>
<command
commandId="myApp.commands.navigationIndy"
label="individual"
style="radio">
<parameter
name="org.eclipse.ui.commands.radioStateParameter"
value="indy">
</parameter>
</command>
</menu>
</menu>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
defaultHandler="myApp.handlers.NavigationHandler"
id="myApp.commands.navigationAll"
name="navigationAll">
<commandParameter
id="org.eclipse.ui.commands.radioStateParameter"
name="navigation"
optional="false">
</commandParameter>
<state
class="org.eclipse.ui.handlers.RadioState:all"
id="org.eclipse.ui.commands.radioState">
</state>
</command>
<command
defaultHandler="myApp.handlers.NavigationHandler"
id="myApp.commands.navigationNone"
name="navigationNone">
<commandParameter
id="org.eclipse.ui.commands.radioStateParameter"
name="none"
optional="false">
</commandParameter>
<state
class="org.eclipse.ui.handlers.RadioState:none"
id="org.eclipse.ui.commands.radioState">
</state>
</command>
<command
defaultHandler="myApp.handlers.NavigationHandler"
id="myApp.commands.navigationIndy"
name="navigationIndy">
<commandParameter
id="org.eclipse.ui.commands.radioStateParameter"
name="indy"
optional="false">
</commandParameter>
<state
class="org.eclipse.ui.handlers.RadioState:indy"
id="org.eclipse.ui.commands.radioState">
</state>
</command>
</extension>
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.26813 seconds