RadioButton
HY all,
I have a small question about the RadioButton control.
How can I call a radiobutton to an another dlg.
I have a file SOUTH, 2 GSD and 2 radiobutton controls, 1 radiobutton on a GSD and an another radiobutton on other Dlg, and I want to use a command inside a normal button IF, command, which depends on the State of a radiobutton to another Dlg.
For example:
If Radiobutton1.Value = 2 and Radiobutton2.Value = 1 Then
Call ---------------------------
End If
Is it possible?
Thank you for your time,
Marius
HI Maria,
You'll need assign a global variable to this radio button control, then you will be able to access the global variable of the other dialog box. I checked with R & D, and they said that it is the only way.
Brad Turpin
Tiara Product Support Engineer
National Instruments
Tags: NI Software
Similar Questions
-
Problem with the dialog box displayed when the RadioButton is selected.
It is an application with 3 buttons button1, radio 2 and output key that uses System.exit (0)
The problem is with the dialogs first two buttons1. I open the application
2 Select a radiobutton, I get a dialog box, I click 'ok', dialog will, that's fine.
3. I choose an another radiobutton button1 or button2, I get the corresponding dialog, BUT know I have to click 'ok' twice to keep it alive.
I don't know what could be the problem, here is the code:
package com.thinkingblackberry; import net.rim.device.api.system.Display; import net.rim.device.api.ui.Color; import net.rim.device.api.ui.DrawStyle; import net.rim.device.api.ui.Field; import net.rim.device.api.ui.FieldChangeListener; import net.rim.device.api.ui.Graphics; import net.rim.device.api.ui.component.ButtonField; import net.rim.device.api.ui.component.Dialog; import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.component.PasswordEditField; import net.rim.device.api.ui.component.RadioButtonField; import net.rim.device.api.ui.component.RadioButtonGroup; import net.rim.device.api.ui.component.RichTextField; import net.rim.device.api.ui.component.Status; import net.rim.device.api.ui.container.MainScreen; import net.rim.device.api.ui.container.VerticalFieldManager; import net.rim.device.api.ui.component.PasswordEditField; public class HelloWorldScreen1 extends MainScreen implements FieldChangeListener, DrawStyle { protected static final int RED = 0; MButtons fullscreen; //protected RadioButtonGroup rbGroup= new RadioButtonGroup(); public HelloWorldScreen1() { final RadioButtonGroup rbGroup=new RadioButtonGroup(); setTitle("Application"); RadioButtonField rbField= new RadioButtonField("RadioB1"){ protected void paint(Graphics g){ g.setColor(Color.ROSYBROWN); super.paint(g); } }; RadioButtonField rbField2= new RadioButtonField("RadioB2"){ protected void paint(Graphics g){ g.setColor(Color.SIENNA); super.paint(g); } }; RadioButtonField rbExit=new RadioButtonField("Exit"){ protected void paint(Graphics g){ g.setColor(Color.DARKSLATEBLUE); super.paint(g); } };; rbGroup.add(rbField); rbGroup.add(rbField2); rbGroup.add(rbExit); add(rbField); add(rbField2); add(rbExit); rbGroup.setChangeListener(new FieldChangeListener() { public void fieldChanged(Field field, int context) { if (rbGroup.getSelectedIndex() == 0) { Dialog.inform( ""+rbGroup.getSelectedIndex()); } else if (rbGroup.getSelectedIndex() == 1) { Dialog.inform( ""+rbGroup.getSelectedIndex()); } else if(rbGroup.getSelectedIndex()==2){ System.exit(0); } } }); } public HelloWorldScreen1(long arg0) { super(arg0); } public void fieldChanged(Field field, int context) { } }
I guess the event changed field is called twice, once deselection button1 and once to select button2. you pay your processing logic to account for this.
-
See RadioButton option...
I m using the RadioButton options in my screen. Click the RadioButton I'm another screen where I m displyaing
a text message.
Now that RadioButton is checked as if I select it. But if I want to reselect its does not work... everything I need to return to the home screen or select an another RadioButton n after that I m able to select this RadioButton again.
How can I select the number of time, IE, select goto the back screen... Go back and select again...
Please help what to do...
Thanks in advance.
This isn't a problem, however for your need, you can uncheck passing the value false to the radio button setSelected method after presenting the text as you say...
Thank you!
-
Change the background color of RadioButton
Hello
How to change the selected RadioButton background color?
It shows the blue when selected.
I tried all States using the setTextFormatForState() method.
but it never worked.
The method seems to only change the format of text label, but not th 'button' (in the background) itself.
Thank you.
Hey,.
so that you can change the appearance of the button under different States (selected or deselected), you must change the button skin. to do this you need to create your own custom skin of the class who extends the class . UISkin here is an example of how to change skin:
http://www.BlackBerry.com/developers/docs/airapi/1.0.0/QNX/UI/skins/package-detail.html
also, here is a link to the list of the Active of the RadioButton class (background colors and etc.):
http://www.BlackBerry.com/developers/docs/airapi/1.0.0/skins-detail.html#rounded
This is the same skin as a regular button its called RoundedButtonSkinWhite.
to apply the skin to the button of your radio, you must call the setSkin method that accepts only classes that extend the UISkin class.
hope that helps. Good luck!
-
Two RadioButton on the same line with any idea...
Hello
Can I add two RadioButton singel online...
I m using HorizontalFieldManager with him
but only the first button is visible... give me a solution simple and good for this please help me.
Thank you
Himanshu
Beginner
Please find the Code below and try it and let me know...
radioButtonGroup = new RadioButtonGroup(); radioButtonField = new RadioButtonField("Radio 1", radioButtonGroup, true, 0) { protected void layout(int arg0, int arg1) { setExtent(Display.getWidth() / 2, arg1); super.layout(Display.getWidth() / 2, arg1); }; }; radioButtonField1 = new RadioButtonField("Radio 2", radioButtonGroup, false, 0) { protected void layout(int arg0, int arg1) { setExtent(Display.getWidth() / 2, arg1); super.layout(Display.getWidth() / 2, arg1); }; }; HorizontalFieldManager hfmFieldManager = new HorizontalFieldManager() { protected void sublayout(int maxWidth, int maxHeight) { setExtent(Display.getWidth(), maxHeight); super.sublayout(Display.getWidth(), maxHeight); } }; hfmFieldManager.add(radioButtonField); hfmFieldManager.add(radioButtonField1); add(hfmFieldManager); add(new LabelField("This label is below the two radio buttons",FOCUSABLE)); add(new ButtonField("Click ME!"));
-
Hello
Can u help me pls how to get the drop-down list option when we choose control radiobutton in the same screen.
When deselect us it, he must hide the drop on the with on screen no matter what accent...
Thanks in advance...
u r Correct.
Acutally we work on popupscreen with transparency.
I use the 4.3 sound support for setmargin(4.5 doesn't).
I went through the doc 4.5 Finally I got the result.
I need to set the drop down just below the dropdown list how can I without no hardcode... pls let me know...
now iam using setmargin (encode);
If you have any advice that can help me in pls reffer me programming skills.
I wil get u was pushing for the next...
Thank you for your way of orientation...
-
Click RadioButton event doesn't wok.
Hello.
I'm developing a mobile application from ActionScript 3.0 for PlayBook.
The following code does not work:
package { import flash.display.Sprite; import flash.events.MouseEvent; import flash.net.SharedObject; import qnx.ui.buttons.LabelButton; import qnx.ui.buttons.RadioButton; import qnx.ui.buttons.RadioButtonGroup; public class OptionsPage extends Sprite { private var selectedLanguage:String; public function OptionsPage(stageWidth:int, stageHeight:int) { super(); createGUI(stageWidth, stageHeight); } private function createGUI(stageWidth:int, stageHeight:int):void { var spRb:RadioButton = new RadioButton(); var caRb:RadioButton = new RadioButton(); var frRb:RadioButton = new RadioButton(); var deRb:RadioButton = new RadioButton(); var itRb:RadioButton = new RadioButton(); var rbGrp:RadioButtonGroup; var exitButton:LabelButton; spRb.label = "Español"; spRb.groupname = "languageGroup"; spRb.setPosition((stageWidth - spRb.width)/2, (stageHeight - spRb.height)/2); addChild(spRb); caRb.label = "Català"; caRb.groupname = "languageGroup"; caRb.setPosition(spRb.x, spRb.y + 40); addChild(caRb); frRb.label = "Française"; frRb.groupname = "languageGroup"; frRb.setPosition(spRb.x, caRb.y + 40); addChild(frRb); deRb.label = "Deutsch"; deRb.groupname = "languageGroup"; deRb.setPosition(spRb.x, frRb.y + 40); addChild(deRb); itRb.label = "Italiano"; itRb.groupname = "languageGroup"; itRb.setPosition(spRb.x, deRb.y + 40); addChild(itRb); rbGrp = RadioButtonGroup.getGroup("languageGroup"); rbGrp.addButton(spRb); rbGrp.addButton(caRb); rbGrp.addButton(frRb); rbGrp.addButton(deRb); rbGrp.addButton(itRb); rbGrp.addEventListener(MouseEvent.CLICK, rbClickHandler); rbGrp.setSelectedRadioButton(spRb); selectedLanguage = "es"; exitButton = new LabelButton(); exitButton.label = "Exit"; exitButton.setPosition(spRb.x, deRb.y + 40); exitButton.addEventListener(MouseEvent.CLICK, exit); addChild(exitButton); } private function rbClickHandler(event:MouseEvent):void { if (event.target != null) { selectedLanguage = event.target.toString(); } } private function exit(event:MouseEvent):void { var mySo:SharedObject; mySo = SharedObject.getLocal("userPreferences"); mySo.data.userLanguage = selectedLanguage; mySo.flush(10000); var lprogram:ProgramClass; lprogram = this.parent as ProgramClass; lprogram.startWindow(null); } } }
rbClickHandler is not executed.
Any advice?
You are right.
I copied this code of Blackberry Developer's Guide.
Thank you.
-
Hello
How to disable/enable inputtextfileld on select of another radiobutton using adf12.1.3
Can anyone provide a few points on that.
I did it like below on my listner valuechange radiobutoon method but does not work
{} public void onRadiobuttonVCE (ValueChangeEvent valueChangeEvent)
Add the code in the event here...
log.info ("GCONF1001Bean onRadiobuttonVCE() started:::"+valueChangeEvent.getNewValue()); ")
concentratorMode = valueChangeEvent.getNewValue (m:System.NET.SocketAddress.ToString ());
concentratorMode is the value of the selected radiobutton
RichInputText r = findComponentInRoot ("it2") (RichInputText);
log.info ("value of r GCONF1001Bean onRadiobuttonVCE:" + r);
{if (concentratorMode.Equals("1"))}
log.info ("GCONF1001Bean onRadiobuttonVCE() inside the 1st if :::"); ")
r.setDisabled (false);
log.info ("GCONF1001Bean onRadiobuttonVCE() after 1st if :::"); ")
}
{if (concentratorMode.Equals("2"))}
log.info ("GCONF1001Bean onRadiobuttonVCE() inside the 2nd if :::"); ")
r.setDisabled (true);
log.info ("' GCONF1001Bean onRadiobuttonVCE (after if 2nd): '");
}
{if (concentratorMode.Equals("3"))}
log.info ("GCONF1001Bean onRadiobuttonVCE() inside the 3rd if :::"); ")
r.setDisabled (true);
log.info ("GCONF1001Bean onRadiobuttonVCE() after the 3rd if :::"); ")
}
}
--
JS
You can set a variable bean said "textBeanDisabled" and set the value of this 'Y' or 'n', based on your health status.
Then set the disabled property
Just copy - paste your logic to the above post:
String textBeanDisabled = "N";
{} public void onRadiobuttonVCE (ValueChangeEvent valueChangeEvent)
Add the code in the event here...
log.info ("GCONF1001Bean onRadiobuttonVCE() started:::"+valueChangeEvent.getNewValue()); ")
concentratorMode = valueChangeEvent.getNewValue (m:System.NET.SocketAddress.ToString ());
concentratorMode is the value of the selected radiobutton
RichInputText r = findComponentInRoot ("it2") (RichInputText);
log.info ("value of r GCONF1001Bean onRadiobuttonVCE:" + r);
{if (concentratorMode.Equals("1"))}
log.info ("GCONF1001Bean onRadiobuttonVCE() inside the 1st if :::"); ")
r.setDisabled (false);
textBeanDisabled = "N";
log.info ("GCONF1001Bean onRadiobuttonVCE() after 1st if :::"); ")
}
{if (concentratorMode.Equals("2"))}
log.info ("GCONF1001Bean onRadiobuttonVCE() inside the 2nd if :::"); ")
r.setDisabled (true);
textBeanDisabled = 'Y ';
log.info ("' GCONF1001Bean onRadiobuttonVCE (after if 2nd): '");
}
{if (concentratorMode.Equals("3"))}
log.info ("GCONF1001Bean onRadiobuttonVCE() inside the 3rd if :::"); ")
r.setDisabled (true);
textBeanDisabled = 'Y ';
log.info ("GCONF1001Bean onRadiobuttonVCE() after the 3rd if :::"); ")
}
}
See you soon
AJ
-
Hallo,
IK maak van een form use, waar I via een keuze maken good vier ITU Radio buttons. Maar ik kan niet een keuze ongedaan maken als ik mij heb en ik openen niet ITU deze vier vergist had willen kiezen. IK kan nu alleen iets anders kiezen ITU vier upheaval.
While ik wel eens een aangeklikt heb radiobutton, maar is er weer op you will ongedaan heb photos.
Weet iemand hoe I say in Muse moet doen?
John van Groet
This is how the radio buttons and their groups of work. Nothing exceptional here. If you want multiple selections or individual selection switch, you must use the normal checkbox element.
Mylenium
-
Insert text into the textfield after radiobutton selection
Hello
I'm sorry, in the first place, for my bad English.
I need that after selection of the radiobutton appears in textfield's text.
.
option 1
option 2
option 3
If you choose option 1 in textfield "direzione" see "servizi sociali".
If you choose option 2 in the textfield "direzione" see «affari istitzionali»
etc etc.
I need code for adobepro javascript and where I have to insert it
Is it Possible?
Thank you very much
You can try this...
I found it in a post down below in the list, but it is for the insertion of text after clicking on a checkbox.
Apply it on your radio button and it could do something similar...
You can try the following as the mouse struggle for the checkbox control:
If (event.target.value! = "Off") {//If checkbox is checked
this.getField("Textbox1").value = 'blah blah blah ';
}
else this.getField("Textbox1").value = ""; Clear the text field if the check box is unchecked
Peter
-
Unique value as Checbox or RadioButton that submits the page
I need a page element with a unique value which submits back to page, so that I can view conditionally other page elements.
I know a traditional "button would work, but the checkbox or Radiobutton would be my preference.
Here's where I'm stuck.
BOX - I used dynamic events to hide/show page elements, but in this case I need a QUOTE.
RADIO BUTTON - this works very well with the option redirect or submit, but I only have 1 value, so I act as a power button, when if he is selected and the user clicks top again, he turns not selected... I don't know how to do this.
Ideas in both cases?On the box, can you just add a dynamic action such that when it changed and in an activated State (usually a non-null value), run Javascript. Have the Javascript apex.submit ('GO').
(Instead of 'GO' using the value of your own desired request, or none at all if you don't want or need an application of value.)
-
Hello world
Forgive my ignorance, as I am a noob on javascript. I need help on the creation of automation on the text field, and I hope you can give me a hand.
This is the scenario
a radiobutton is created with the following options:
1-10
11-20
21-30
31-40
41-50
51-60
I need auto-fill, a text field when:
'1-10' is selected with 'too low '.
"11-20" is selected with 'so so '.
'41-50' is selected with "awsome".
'51-60' is selected with 'to high '.
and when
"31-40" is selected with nothing
and no is selected with "select one please".
Thanks in advance
That's ok. In this case, you can use something like that than the calculation script custom of your text field:
var v = this.getField("Radio1").value;
If (v is 'Off') event.value = "SΘlectionner one if you please."
else if (v == '1-10') event.value = "too weak."
else if (v == "11-20") event.value = "So so";
continue with the rest of the possible values in this way...
-
RadioButton decides TextField content
Hello!
I have this RadioButton that, depending on what you choose, the text to display in a TexField, like this:
I tried something like, but does not work:
by this being, the box
If (this.rawValue == 'Yes') {}
Form1. Subform2.TextField01.access = "readOnly";
Form1. Subform2.TextField01.RawValue = "you click Yes;
Subform2 is the name of the page where is the textfield, the radio and the textfield object is in different pages
}
ElseIf (this.rawValue == 'no') {}
Form1. Subform2.TextField01.access = "readOnly";
Form1. Subform2.TextField01.RawValue = "you choose No."
} else {}
Form1. Subform2.TextField01.access = "open";
If you neither yes nor no, the textfield is editable, and you can fill it with anything you want
}
Any ideas?
Maybe your script is wrong. Option buttons normally have the value default 1, 2... No Yes or no.
I think it's the same thing in your pdf.
You must do the following:
- mark in the hierarchy the radiobuttonlist
- go to 'object ' | "binding" and take a look here
- then you must use the following script (you can not ask 'yes' or 'no'. 'Yes' or 'no' is the legend, not the value.
//you choose yes if(this.rawValue == 1) { Textfeld1.access = "readOnly"; Textfeld1.rawValue = "you choose YES"; //you choose another, in a radiobuttonlist with two options is this this no }else { Textfeld1.access = "readOnly"; Textfeld1.rawValue = "you choose NO"; }
That's all. If no one clicks Yes or no, the textfield object is open. You don't need this script.
I hope I could help?
Kind regards Mandy
-
Hello
We have a RadioButton group, no default value in our forms.
The RadioButtonGroup is not mandatory.
If someone chooses one of the radio buttons, it is not possible to deselect.
Is there a possibility to deselect by coding?
Thank youMatthias BR
You can also use check boxes for this. If you need the selection circle can change this option.
Alternatively, you can set a value in the group radio button 'OFF '.
Turn off the radio button selection
this.getField("Radio_Button_Group_Name").value = 'Off ';
-
I have 3 buttons radio stored inside a single movieclip (movieclip link: radioBtns_mc). I gave the same name of group to all radio 3 buttons and 3 instance names different to those radio buttons inside radioBtns_mc (radio_btn1, radio_btn2, radio_btn3)
The root, I have a mc called radioStage_mc.
Here is my code. My problem is that none of the radio buttons work?
var yPosition:Number = 0;
ReceiveLoad.onData = {function (src)}
var messageA:Array = src.split(",,,");
for (var i: Number = 0; i < messageA.length; i ++) {}
var a:Array is get [i].split(",,");.
_root.radioStage_mc.attachMovie ("radioBtns_mc", "radioBtn" + i, _root.radioStage_mc.getNextHig hestDepth()); works
_root.radioStage_mc ["radioBtn" + i] ._y = PositionY;
PositionY = PositionY + 20;
{if(a[1]=="chair")}
trace (a [1]) //output President
_root.radioStage_mc ["radioBtn" + i] .radio_btn3. Selected = true; / / does not work
} else {}
_root.radioStage_mc ["radioBtn" + i] .radio_btn3. Selected = false; / / does not work
}
/ / _root.radioStage_mc.radioBtn1.radio_btn2.selected = true; //even direct route does not work?
}
}
I also tried to trace (radio_btn3) on the timeline within the radioBtn1 and then tried to load the data, it will output the Correct path.
Then I tried to add the same path directly in the code - the option button didn't do anything (the radio button was supposed to be true)?
You may need to delay setting this property:
var yPosition:Number = 0;
ReceiveLoad.onData = {function (src)}
var messageA:Array = src.split(",,,");
for (var i: Number = 0; i
var a:Array is get [i].split(",,");.
_root.radioStage_mc.attachMovie ("radioBtns_mc", "radioBtn" + i, _root.radi oStage_mc.getNextHighestDepth ());
_root.radioStage_mc ["radioBtn" + i] ._y = PositionY;
PositionY = PositionY + 20;
{if(a[1]=="table")}
setTimeout (setF, 100, _root.radioStage_mc ["radioBtn" + i] .radio_btn1);
} else {if(a[1]=="Sofa")
setTimeout(setF,100,_root.radioStage_mc["radioBtn"+i].radio_btn2);
} else {if(a[1]=="Chair")
setTimeout(setF,100,_root.radioStage_mc.[") radioBtn "+ i] .radio_btn3);"
}
}
function setF(rb:RadioButton):Void {}
RB. Selected = true;
}
Maybe you are looking for
-
How can I add a photo to identify a contact in the Message
How can I add a photo to identify a contact in the Message
-
How to crop an image that I pasted into an e-mail message?
I stuck a page in an email, is there a way for cultures within Thunderbird or what I need to do cela in another program, then copy it from this show and paste in my email.
-
Satellite C660D - issues with SATA Toshiba MK5065GSX 500 GB HARD drive
Hello I have problems with a Toshiba MK5065GSX SATA 500 GB from a Satellite C660D client. Cannot start the machine: was doing a start-up and factory default restore comes up with error, so does not actually load Windows. Therefore impossible to use c
-
HP Pavillion G6: hp will continually turn off but cpu 48 - 49 c temp
Help, please! I love and need my laptop! I have a Pavillion G6-2200. In December I started having overheating problems. I was able to clean a very dirty fan and for the last three months, that it worked perfectly, well except that I couldn't use my
-
How to add additional licenses of the IPCC 6.0?
I have 6.0sr8 of the IPCC in production with outgoing Option (Dialer). We are looking to add a few officers of the IPCC and Dialer ports as well. Can someone point me to the right document or the steps involved in this process? Really appreciate your