Space between htmlb radio buttons
Hello all,
I'm working with a jsp as part of a par file, and I'm trying to put a little bit of space between two radio buttons in a radioButtonGroup hbj tag. I've not had any success in doing so. Here's my code:
<hbj:radioButtonGroup
id="rbgSuppressZeros"
columnCount="2"
selection="N">
<% rbgSuppressZeros.setOnClick("suppressZeros"); %>
<hbj:radioButton
id="doNotSuppress"
text="Dont Suppress Zero Quantities"
key="N"
/>
<hbj:radioButton
id="doSuppress"
text="Suppress Zero Quantities"
key="Y"
/>
<% rbgSuppressZeros.setSelection(SearchBean.getSuppressZeros());%>
</hbj:radioButtonGroup>
I've tried adding spaces in the text attribute without success. I've also tried including in the text attribute, but the page just displayed ' ' instead of translating it into a space. I tried adding several times between the hbj:radioButton tags without success.
Does anyone know how to do this?
Thanks!
Stephen Spalding
Web Developer
Graybar
Hi Stephen,
Try this code:
<hbj:radioButtonGroup
id="rbgSuppressZeros"
columnCount="2"
selection="N">
<% rbgSuppressZeros.setOnClick("suppressZeros"); %>
<hbj:radioButton
id="doNotSuppress"
text="Dont Suppress Zero Quantities"
key="N"
/>
<br>
<hbj:radioButton
id="doSuppress"
text="Suppress Zero Quantities"
key="Y"
/>
<% rbgSuppressZeros.setSelection(SearchBean.getSuppressZeros());%>
</hbj:radioButtonGroup>
by adding the <br> tag it gives a space between your radio buttons. You can add as many <br> tag according to your requirement.
Hope this solves your problem. If any problem then let me know.
Regards
Pravesh
PS: Please award points if helpful.
Similar Messages
-
Displaying radio buttons with dynamic subforms between 2 radio buttons
I am very new to Adobe Designer/Form Server and had the following question.
Our form is going to have the following display
Radio A
Radio B
Radio B1
List of text boxes
Radio B2
Radio C
Radio C1
List of text boxes
Radio C2
When the form is first displayed, user sees Radio A, Radio B and Radio C, right below each other. When the user selects Radio B, Radio B1 and Radio B2 should appear, and the Radio C should 'slide' down to accomodate Radio B1 and B2.
Similarly, when the user clicks Radio B1, List of text boxes should appear and Radio B2 should 'slide' down to accomodate those text boxes.
Is this possible? Can anyone please send me a sample code/design?
ThanksWell I got the form to work by copying the Options List Java Script code in change to docReady and adding if(this.rawValue==0). This produces the result that I need.
To clean this up I would like to put this code in a Script Object so I can use the same code in both change and docReady. I’m not a programmer so I’m not sure what additional code I have to put in the Script Object and what code I have to put in change and docReady to use the Script Object. Any assistance would be greatly appreciated.
Thank you. -
Af:selectOneRadio : spacing between radio button and it's text
Hi All,
JDev 11.1.1.6
I want to put some space between two radio buttons (between two af:selectItem) say some 10px.
<af:panelGroupLayout layout="horizontal" id="pgl9">
<af:outputText value="1. New mobile phone connection"
inlineStyle="font-size: 12px; vertical-align: top; color: #f37f41; font-weight: bold; padding-left: 15px;"
id="ot23"/>
<af:spacer width="10" id="s15"/>
<af:selectOneRadio id="sor1" layout="horizontal" autoSubmit="true"
inlineStyle="padding-top: 5px; padding-left: 49px; padding-right: 20px;"
binding="#{backingBeanScope.ServiceReq.selectRadio1}">
<af:selectItem label="1GB Data" value="1GB Data" id="si2"/>
<af:selectItem label="10 GB Data" value="10 GB Data" id="si1"/>
</af:selectOneRadio>
</af:panelGroupLayout>
I tried setting it inlineStyle="margin:10.0px;" and also tried setting it in the css, but of no use.
Thanks in advanceHi,
<af:selectItem does not support inLine style therefore try to add sequence of non-breaking space(  ; ) for the label end of the radio
See
http://www.w3schools.com/html/html_entities.asp -
Based on the examples
here
and
here
I have a datagrid which uses an XML object as its dataprovider. The
xml goes like this:
<questions>
<question>
<prompt>What are your heroes?</prompt>
<answers>
<answer>
<correct>true</correct>
<text>Luther Higgs</text>
</answer>
<answer>
<correct>false</correct>
<text>Barney Fife</text>
</answer>
</answers>
</question>
</questions>
Well formed (if a bit confusing) xml. In my datagrid I have
two columns. The second column binds to
questions.question.answers.answer.text and works just fine. The
datagrid's editable property is set to true, and I'm able to click
on the second colum and type and it saves the answer back into the
xml object just fine. The problem lies in my first column. The mxml
looks like this:
<mx:DataGridColumn headerText="Correct">
<mx:itemRenderer>
<mx:Component>
<mx:VBox horizontalAlign="center">
<mx:RadioButton id="myRadioButton"
buttonMode="true" useHandCursor="true"
group="{outerDocument.myRadioButtonGroup}"
selected="{data.correct}"/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
The problem is that the radio buttons' selected properties
aren't bound to the xml, that is the one that is true doesn't
display as selected. If I set the datagridcolumn's editable
property to false, clicking on the radio button doesn't affect the
xml at all either. If I leave the editable property of the
datagridcolumn as the inherited default of true (based on the
parent datagrid's editable property) when I click on the radio
button the default itemEditor appears (a text input box) which
contains the following text:
</answer>
and when I leave the editor (click outside or hit enter) the
xml then looks like this:
<answers>
<answer>
<correct>true</correct>
<text>Luther Higgs</text>
</answer>
<answer>
<correct>false</correct>
<text>Barney Fife</text>
<null><answer>
<correct>false</correct>
<text>Barney Fife</text>
</answer></null>
</answer>
</answers>
I have seen controls that don't have the xml path written
correctly display the entire xml node rather than just the
contained data, but I can think of no reason anything should Ever
reference just the closing tag. To me this looks like a bug in the
data bindings between the radio button and the xml object.
Just to clear the air to avoid suggestions that will work but
not meet the design requirements, what I need is a datagrid that
has a radio button group (only one correct answer out of the group)
in the first column and strings in the second column which need to
be editable. I suppose I could write some hairy event listener code
and manually hack things together, but aside from avoiding that
headache, I'd love to use data bindings for what they were intended
for - I just need to know why it doesn't appear to be working
right. Much thanks in advance for any and all help.Searching the LiveDocs revealed the answer. Under the topic
"Using an E4X expression in an <mx:Binding> tag" I found that
if instead of
<mx:RadioButton id="myRadioButton"
buttonMode="true" useHandCursor="true"
group="{outerDocument.myRadioButtonGroup}"
selected="{data.correct}"/>
I have
<mx:RadioButton id="myRadioButton"
buttonMode="true" useHandCursor="true"
group="{outerDocument.myRadioButtonGroup}"/>
<mx:Binding source="myRadioButton.selected"
destination="data.correct" />
It works just perfectly.
Apparently binding between XML and the selected property of a
radio button (which is of type boolean) needs the <mx:Binding
/> rather than the in-tag curly brace notation.
P.S. The link on livedocs is here:
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=databinding_091_05.html#177459 -
I have a very common use case where you have a few radio buttons and only one can be selected at a time. Some of them are basic and on click should be selected right away, but other are more complex and open a pop up which requires some additional user selections after which the user selected OK or CANCEL for example and only after that the selection of the radio button should be applied programatically.
So to solve this issue I've come up with 2 workarounds:
1) make the entire group, that holds the radio button, act as a button with buttonMode="true" mouseChildren="false" and programatically change the radio button within it.
2) hold the current radio button selection in a variable and in the changeHandler of that radio button return the selection back to what was selected before. But this also causes a small flickering of the radio button which gets selected and deselected immediately after that.. not cool.
So my question is... is there something I am missing that could do the job without these workarounds... like a Changing event which I use for the ButtonBar but I can't find on the RadioButton or RadioButtonGroup... thanks!Hi,thanks for the reply. Actually that was my third option, but not sure if it's very good also..
Here is a simple scenario:
User must select between 2 radio buttons:
1) no volume -> sets variable volume=0 and selects the radio button (that is the normal use case)
2) set volume -> opens up a pop up with a list that has a X button to close and 4 options: 25% volume, 50% volume, 75%, 100%
At this point the set volume radio button should not be selected and the user has 2 choices:
-> hit the X button to close - nothing changes and no volume radio button is still selected and volume is still = 0
-> hit one of the volume % buttons -> the set volume radio button gets selected and the variable volume=25/50/75/100 depending on the button selected by the user.
That's a pretty common scenario and it's bugging me that I can't easily alter the radio button selection logic since whenever I click it, it gets selected and I can't put a logic in between in a standard way. This should apply to any component with selection, just like ButtonBar has it with the Changing event.
So is there any other more convenient way to accomplish this scenario that you could recommend?
Thanks! -
Within Captivate 7, I'm able to view radio buttons contained within quizzes from Captivate; however, once the file is published and hosted on the LMS the radio buttons disappear. There are no objects on the slide and the master slide background is being used on the stage. Any suggestions?
Somewhat related, my radio buttons look fine authoring and previewing but once published and pushed to SCORM Cloud, they are cut off on the right.
I looked through all of the objects in the Object Style Manager of the Themes and nothing radio-button related there. I used the indent capability of the choices on the master slide for the MC questions but it only widened the gap between the choice label (A, B, C...) and the choice text, not the gap between the radio button and the choice label. Was just going to post on this but may be same issue as yours? -
Use of differnet radio buttons in QA07
Hi All ,
What the basic difference between below radio buttons in qa07 :
Lot creation only : it will create lot only
To insp. stock at lot creation : It will create lot and post qty from un restricted to restricted
Block Batch at lot creation : It will create lot and block batch
but what's the use of To insp. stock at inp. date and block batch at inspection date .and how they are different from options above them
REgardsI'm pretty confident in what it is doing. :-)
The idea is that you use the "initial days" to create a window of dates to look for batches needing reinspection based on the next inspection date. If this is window is just 1 or null it really has no affect regardless of what you pick.
The idea is to allow creation of the inspection lots well in advance of their actual inspection date. To do this you select "to insp. stock at inspection date" You don't want to remove the stock from UR and make it unavailable for use or sale but you want to start inspection. Than, IF you have not processed or sold the lot by the inspection date, or have not completed the UD on the 09 lot, the transfer document is created and the stock is moved to QI stock and linked to the insp. lot. You should be running the program every day in this case. Ideally, you complete the re-inspection without the stock ever leaving UR.
If you use "to insp. stock at lot creation" and you use an initial window of 60 days, than you will still create the lot 60 days in advance but the stock goes to QI and is unavailable to sell or use. Some folks like this because they don't want to ship something out to a customer that only has a minimum amount of time left on it.
It's simply your client's preference as to how they do it.
Craig -
Automatic Graphics Switching: Checkbox vs Radio Buttons
In the Energy Saver preferences pane, there is a toggle for graphics switching on my rMBP. Sometimes this displays as two radio buttons for Better Performance or Longer Battery Life. Sometimes this appears as a checkbox for Automatic graphics switching. Why does it display one way or another; is there any difference between the radio buttons and the checkbox?
I thought it might be something like that, but I've seen both modes when I'm on battery power. I'm plugged in right now and it's giving me the radio buttons.
Interestingly, when the radio buttons are shown it defaults to Higher performance even though the current setting appears to be Better battery life (indicated by the You must log out…message, which disappears when I select Better battery life). This happens every time I see the radio buttons. -
Adding space between a buttons in a navigation list
Hello,
I am currently using apex 3.2.1 with a 10g backend. All of my forms are using a button list navigation. On one of my forms, I want to add more space between two buttons. Is this possible?
Thanks,
MaryThat doesn't work for a button list navigation. It just makes the button bigger. I need space between two of the list entries in the navigation.
Thanks,
Mary -
Menu widget (horizontal) space between buttons
How do I get spaces between navigation buttons on the horizontal menu widget?
In the basic Katie video, she does this as a "pre-set". Then in the advanced video it shows up in the images with no discussion. Thanks for helping.Hello,
You can either choose to use manual menus for this and place the menu as per your requirement, or you can use the "uniform spacing" option in the item size section of menu options for some spacing between the menu items.
Cheers
Parikshit -
How can I set some space between buttons on the buttonbar
I want to set some empty spaces between buttons on the button control bar?
Thank you.
ScottIf you mean a JToolBar try addSeparator();
If you mean a JMenuBar... I don't know! -
How can i set the space between two button?
Hello,
I have
<mx:HBox>
<mx:Button label="one" />
<mx:Button label="two" />
</mx:HBox>
how can i set the distance between this two compotents?
Thanksquote:
Originally posted by:
robinbouc77
Hi,
you can use horizontalGap property on HBox to change the
space between your buttons. I think the default value is 6. You can
also use <mx:Spacer/>, but changing the gap on HBox is
probably the cleanest way ;)
C U
perfect!!! works fine -
How to create radio button between two slection screen
hello all.
could you please guide me how to create radio button between two SELECTION-SCREEN in screen painter.
Thank you,
srinivashi
SEE THIS CODE
REPORT ZNNR_REPORT NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
******DATA DECLARATIONS**********
DATA : BEGIN OF IT_PLANT OCCURS 0,
MATNR LIKE MARA-MATNR,
WERKS LIKE MARC-WERKS,
PSTAT LIKE MARC-PSTAT,
EKGRP LIKE MARC-EKGRP,
END OF IT_PLANT.
DATA : BEGIN OF IT_PONO OCCURS 0,
EBELN LIKE EKKO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
WERKS LIKE EKPO-WERKS,
LGORT LIKE EKPO-LGORT,
END OF IT_PONO.
TABLES EKKO.
********END OF DATA DECLARATIONS*********
********SELECTION SCREEN DESIGN ***********
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R3 RADIOBUTTON GROUP G2 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R3.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R4 RADIOBUTTON GROUP G2.
SELECTION-SCREEN COMMENT 5(20) TEXT-004 FOR FIELD R4.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
******END OF SELECTION SCREEN DESIGN****************
<b>rEWARD IF USEFULL</b> -
How in the heck did the spaces between the buttons get in there?
Hello,
Go to this link: http://www.peterdanko.com/peterdanko.com/gb_installation2.html# Note the white spaces between the buttons. They are not supposed to be there. All margins/borders are set to zero. Then, because of this white space, the last button gets tossed into the great cyber void.
What am I doing wrong? and how come when I used this same structure on other pages it worked perfectly?
Thanks,Hi Peter,
about hotspots: you only need to build an image with your buttons (I made it at the moment with 5 so that I can send it here), like this:
Then you have to insert this image in your DW file, a menu opens, which looks like this (German DW):
Now you can do 10 overlays with these green (rectangle) areas and assign each aerea with a link.
Hans-G. -
Hi,
Here i put three buttons on panel one under one but there is no space between them although i determine the space ..
my code :
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class MainFram extends JFrame {
private JPanel mainPanel;
private JButton[] buttons;
// private JLabel[] labels;
private String[] labelNames = {"Levels", "Help", "About"};
private static final int BUTTON_DISTANCE_Y = 20;
private static final int BUTTON_WIDTH = 50, BUTTON_HEIGHT = 50;
public MainFram() {
intializingPanel();
intializingButtons();
// intializingLabel();
getContentPane().add(mainPanel);
public static void main(String[] args) {
MainFram mainFram = new MainFram();
mainFram.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainFram.setSize(new Dimension(600, 300));
mainFram.setLocationRelativeTo(null);
mainFram.setVisible(true);
mainFram.setExtendedState(MAXIMIZED_BOTH);
private void intializingPanel() {
mainPanel = new JPanel(null);
mainPanel.setBounds(100, 10, 600, 300);
mainPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 5));
mainPanel.setBackground(Color.GREEN);
private void intializingButtons() {
buttons = new JButton[labelNames.length];
for (int i = 0; i < labelNames.length; ++i) {
buttons[i] = new JButton();
buttons.setBounds(50, (BUTTON_DISTANCE_Y * i) + 50, BUTTON_WIDTH, BUTTON_HEIGHT);
mainPanel.add(buttons[i]);
// private void intializingLabel() {
Why this ???
thanks in advancebeshoyatefw wrote:
Why this ???Because you have the equation wrong!
buttons.setBounds(50, ((BUTTON_DISTANCE_Y + BUTTON_WIDTH) * i) + 50, BUTTON_WIDTH, BUTTON_HEIGHT);
Maybe you are looking for
-
Different contrast with original HD files and files imported in Premiere Pro CS4
I'm experiencing a very strange problem. Not the first time though. When I import files shot with reflex video cameras this is what happens: It seems something like shadow/highlights feature in Photoshop, but I haven't done anything to have such a hu
-
Photos can't update my iPhoto Librairy
Photo.app ask to reach my librairy then turn round for hours. After times, it says it can't update for no permissions ? How manage this ?
-
Can't convert any files...
I can't convert any PDF to any format, already tried with files of different size and origin, disabled firewall and moved files from places on my HDD... Not a single difference, always gives "Unexpected Error".
-
Ventrilo or Creative's Software causes my Microphone Playback to Unmute
I am using Windows XP Pro SP3 (Fresh Format and Install) Ventrilo 3.0.5 Sound Blaster X-Fi Titanium PCI Express with the latest Driver and Creative Console ONLY(I did not use CD) Here is a photo of my settings mquirantes.com/ventrilo.jpg I seem to be
-
Driver HP deskjet D4360 and Mac os X 10.7.5
Where can I find driver for HP deskjet D4360 and Mac os X 10.7.5, automatic downloading system saying software is currently unavailable? thank you