Unable to define Radio Button Text field & unable to change column position
Hi,
While designing a screen in Screen Painter, I am unable to define Radio Button Text field as this option is not there in Graphical Element. And also I want to specify the starting position of column of that element different from the default value, but I am unable to define that because the field is non-editable.
Can any one please help me out.
Regards,
Koushik
Hi,
Please find below the sample program from ABAP docu :
PROGRAM demo_dynpro_input_output.
DATA: input TYPE i,
output TYPE i,
radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,
box1(1) TYPE c, box2(1) TYPE c, box3(1) TYPE c, exit(1) TYPE c.
CALL SCREEN 100.
MODULE init_screen_100 output.
CLEAR input.
radio1 = 'X'.
CLEAR: radio2, radio3.
ENDMODULE.
MODULE user_command_0100 input.
output = input.
box1 = radio1.
box2 = radio2.
box3 = radio3.
IF exit NE space.
LEAVE PROGRAM.
ENDIF.
ENDMODULE.
Here radio1(1) TYPE c is defined within the program but in the element list there are RADIO1 element exist. One is actual radio button and the other is Radio Button Text.
I am not able to create that radio button text using same object name.
Please suggest.
Regards,
Koushik
Similar Messages
-
How to define RADIO BUTTONS in MODULE POOL PROG.?
Hi Experts,
I need to keep the RADIO BUTTONS in 1000_screen of my_module_pool prog., like,
I hv 2 fields in this screen, as expected, the first shuld hv DEFAULT selection.
So, I just simply, dragged & dropped 2 radio buttons from left menu of the screen builder & given them the names as
R_SUMMARY
R_DETAIL
Then i executed the transaction, but, these above 2 fields are getting selected, as default??
I know that, if its a REPORT prog. we can define as w/ a GROUP, then the 1st one is hv the default selection.
so,
1 - How to define RADIO BUTTONS in this screen of a module pool prog.
2 - How to use these names in the prog.(PAI - i guess)?
thanq
Edited by: Srinivas on Jul 12, 2008 11:59 PMHi Srinivas,
Please check this link
Re: urgent:Regd radio buttons in module pool
http://saplab.blogspot.com/2007/10/sample-abap-program-for-module-pool_18.html
http://****************/Tutorials/ABAP/Checkbox/page1.htm
http://****************/Tutorials/ABAP/Checkbox/page2.htm
Best regards,
raam -
Ampersand in a radio button text
Please, can somebody tell me how do I get an ampersand (&) in a radio button text using screen painter.
ThanksOn the Element list/General attr. tab I have:
Name Type Line Column Format
G_PRJ Radio 21 30 CHAR
G_PRJ Radio 21 32
On the Element list/Texts/ I/O templates tab I have:
Name Type Text
G_PRJ Radio _
G_PRJ Radio P&S
With these settings, I am getting a fullstop instead of &, so adding the text in the element list didn't work for me. BTW The text where it says _ (underline) is read-only.
Thanks. -
WPF: How to change the radio button text background?
Is there a simple way that we can change the radio button text background? thx!
JaneCIf you literally mean the text background.
It's a contentcontrol.
You can put whatever you like in it to hold the text.
As illustrated by my article:
http://social.technet.microsoft.com/wiki/contents/articles/30173.wpf-tips-radiobutton-alignment.aspx
Thus:
<RadioButton Name="rbnIsolated">
<TextBlock Text="Isolated Storage" Margin="0,-10,0,0" FontSize="22" Background="Pink"/>
</RadioButton>
Makes just the text background pink
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
Inverse Radio button text sens
Hello,
Is there any possible customization for radio buttons to inverse radio text sens.
What we have normally is this:
RadioButton(text), what i want to have is (text) RadioButton.Here is some sample code for the label based alignment method. I did think Greg's quick hack in the prior thread of doing a lookup and reversing positions of the button and text in the original control was a bit better than this. But my guess is that either solution will work fine for you.
import javafx.application.Application;
import javafx.beans.property.*;
import javafx.event.*;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.*;
import javafx.stage.Stage;
/** Re: Inverse Radio button text sens */
public class LabeledRadioButtonSample extends Application {
public static void main(String[] args) { launch(args); }
@Override public void start(Stage stage) throws Exception {
ToggleGroup toggleGroup = new ToggleGroup();
VBox layout = new VBox(15);
layout.getChildren().addAll(
new LabeledRadioButton("Left", ContentDisplay.LEFT, toggleGroup),
new LabeledRadioButton("Right", ContentDisplay.RIGHT, toggleGroup)
toggleGroup.getToggles().get(0).setSelected(true);
layout.setStyle("-fx-background-color: cornsilk; -fx-padding: 10;");
stage.setScene(new Scene(layout));
stage.show();
class LabeledRadioButton extends HBox {
private ObjectProperty<RadioButton> radioProperty = new SimpleObjectProperty<>();
public RadioButton getRadioButton() { return radioProperty.get(); }
public LabeledRadioButton(String labelText, ContentDisplay labelPos, ToggleGroup toggleGroup) {
setSpacing(10);
setMaxWidth(Region.USE_PREF_SIZE);
final RadioButton radioButton = new RadioButton();
toggleGroup.getToggles().add(radioButton);
// Add a label at the appropriate relative location..
final Label label = new Label(labelText);
switch (labelPos) {
case LEFT: getChildren().addAll(label, radioButton); break;
case RIGHT: getChildren().addAll(radioButton, label); break;
default: throw new IllegalArgumentException("Unsupported ContentDisplay type: " + labelPos);
// channel all clicks to the radioButton.
setOnMouseClicked(new EventHandler<MouseEvent>() {
@Override public void handle(MouseEvent event) {
radioButton.fire();
event.consume();
// debug methods to show easily show extent of bounds.
radioButton.setStyle("-fx-background-color: palegreen; -fx-border-color: blue;");
label.setStyle( "-fx-background-color: lightblue; -fx-border-color: orange;");
setStyle( "-fx-background-color: coral; -fx-border-color: red;");
} -
Enable disable toolbar items on click on any checkbox,radio button,text box.
Hi Friends,
I am create application in eclipse RCP E4 and now i am trying to Enable disable toolbar items on click on any checkbox, radio button, text box .
Please Help me friends....Hello friend my proble is solve and now i am sharing my solution ....
I am create RCP application and view side any listener click event fire time apply this code
IEvaluationService evaludationService = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
evaludationService.getCurrentState().addVariable("noOfRowsChecked", noOfRowsChecked);
evaludationService.requestEvaluation("com.jobsleaf.propertytester.canDeleteItem");
and add plug in extension and create property tester class means listener property tester class side apply this code
IEvaluationService ws = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
Integer integer = (Integer) ws.getCurrentState().getVariable("noOfRowsChecked");
if (integer != null)
if (integer.intValue() > 0)
return true;
I hope useful above code when use property tester in eclipse RCP -
After upgrading to Firefox 17.0.1 text cannot be entered in either the URL bar, the search bar, or any text boxes/input fields/forms on webpages. When the text field is clicked the cursor is positioned properly and blinks but typing generates no text.
Hello hj21c1yg, check it in [https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode#os=win7&browser=fx17 Safe Mode], in Safe Mode window select '''''"Start in Safe Mode"''''' and see if this happen again, '''''if not''''' see: [https://support.mozilla.org/en-US/kb/troubleshoot-extensions-themes-to-fix-problems#os=win7&browser=fx17 Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]
thank you
Please mark "Solved" the answer that really solve the problem, to help others with a similar problem. -
Adding user-defined number of text fields.
Okay I am having problems, obviously. I am developing a program where the user will enter X and Y values and the program will calculate the relational data. However, I can't even get a start.
First of all, the user defines the number of pairs of points they want to define. For example, they have 20 points, each with its own X and Y, so they click on 20 and then okay in the first window.
The next window will then take their answer and display X and Y text fields for as many points as they defined. However, I can't figure out any way to do this.
Feel free to run the program, the problem lies in the method setTextFields(). Help please!
import javax.swing.*; //FOR SWING COMPONENT CLASSES
import java.awt.*; //FOR CONTAINER CLASS
import java.awt.event.*; //FOR EVENT HANDLING
public class RegressInput extends JFrame
private JComboBox listJComboBox; //COMBO BOX TO HOLD HOW MANY PAIRS OF DATA POINTS THE USER HAS TO ENTER
private JButton answerButton; //BUTTON TO CLICK AFTER SELECTING PAIRS OF DATA POINTS
private JPanel textFieldTopPanel; //TEXT FIELD TOP PANEL
private JPanel textFieldBottomPanel; //TEXT FIELD BOTTOM PANEL
private JPanel textFieldPanel; //TEXT FIELD PANEL
private CardLayout cardSelector; //DECLARE CARD LAYOUT OBJECT
private JPanel cardDeck; //DECLARE CARD PANEL OBJECT
public RegressInput(String title)
super(title); //CALL SUPERCLASS CONSTRUCTOR
//CREATE A CONTAINER
Container container = getContentPane();
//INSTANTIATE CARD LAYOUT OBJECT
cardSelector = new CardLayout();
//INSTANTIATE PANEL OBJECT
cardDeck = new JPanel();
//SET LAYOUT OF CARD DECK PANEL TO CARD LAYOUT
cardDeck.setLayout(cardSelector);
//DEFINE LABEL FOR FIRST CARD
Label question = new Label("How many PAIRS of data would you like to enter?");
//BUTTON TO SUBMIT NUMBER OF POINTS TO PLOT
answerButton = new JButton("OK");
listJComboBox = new JComboBox( getArray() );//USE getArray() METHOD TO SET ITEM LIST OF THE COMBO BOX
listJComboBox.setMaximumRowCount(10); //SETS THE VISIBLE NUMBER OF ITEMS TO THE USER
Label xValues = new Label("X Values"); //LABEL FOR X values
Label yValues = new Label("Y Values"); //LABEL FOR Y values
//BUILD CARD DECK
JPanel comboBoxCard = new JPanel(); //CREATE FIRST CARD
comboBoxCard.add(question); //ADD question LABEL TO FIRST CARD
comboBoxCard.add(listJComboBox); //ADD listJComboBox TO FIRST CARD
comboBoxCard.add(answerButton); //ADD answerButton TO FIRST CARD
textFieldTopPanel = new JPanel(); //CREATE TOP PANEL OF SECOND CARD
textFieldTopPanel.add(xValues); //ADD xValues Label TO SECOND CARD
textFieldTopPanel.add(yValues); //ADD yValues Label TO SECOND CARD
textFieldBottomPanel = new JPanel(); //CREATE BOTTOM PANEL OF SECOND CARD
textFieldBottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10)); //SET LAYOUT FOR BOTTOM PANEL
textFieldPanel = new JPanel(); //CREATE PANEL FOR SECOND CARD
textFieldPanel.setLayout(new BorderLayout(10, 10)); //SET LAYOUT FOR SECOND CARD
textFieldPanel.add(textFieldTopPanel, "North"); //ADD textFieldTopPanel TO NORTH
textFieldPanel.add(textFieldBottomPanel, "South"); //ADD textFieldBottomPanel TO SOUTH
cardDeck.add(comboBoxCard, "Step 1"); //ADD FIRST CARD TO DECK
cardDeck.add(textFieldPanel, "Step 2"); //ADD SECOND CARD TO DECK
container.add(cardDeck); //ADD CARD DECK TO CONTAINER
//DEFINE BUTTON HANDLER OBJECT
ButtonHandler buttonHandler = new ButtonHandler();
//ADD ACTION LISTENER FOR BUTTONS
answerButton.addActionListener(new ButtonHandler());
}//END RegressInput() CONSTRUCTOR
//METHOD TO CREATE AND RETURN AN ARRAY OF VALUES FOR JComboBox
private String[] getArray()
//CREATE ARRAY TO HOLD 30 VALUES
int numbers[] = new int[29];
//CREATE int IN ORDER TO START THE ARRAY AT 2 INSTEAD OF 1
int number = 2;
//ASSIGN VALUES FROM 2 TO 30 TO numbers[] ARRAY
for(int count=0; count < 29; ++count)
numbers[count] = number; //SETS EACH INDEX TO number
number++; //INCREMENTS number
}//END for LOOP
//CREATE pairs[] ARRAY TO HOLD 30 STRINGS
String pairs[] = new String[29];
//ASSIGN VALUES 1 TO 30 IN STRING ARRAY FOR COMBO BOX
for(int count = 0; count < 29; ++count)
pairs[count] = "" + numbers[count];
}//END for LOOP
return pairs;//RETURNS pairs[] ARRAY FOR THE LIST ITEMS IN listJComboBox
}//END getArray() METHOD8
//RETURNS THE ITEM SELECTED BY THE USER FROM THE JComboBox
private int getValue()
//ASSIGNS STRING VALUE OF THE JComboBox TO A WRAPPER
Integer v = new Integer((String) listJComboBox.getSelectedItem());
//ASSIGNS WRAPPER VALUE TO int
int value = v.intValue();
//RETURN VALUE OF SELECTED ITEM
return value;
}//END getValue()
private void setTextFields()
{//HERE LIES THE PROBLEM! WHAT GOES IN THIS METHOD????
for(int count = 0; count < (2 * getValue()); ++count)
}//END setTextFields()
//BUTTON EVENT HANDLER CLASS
private class ButtonHandler implements ActionListener
//PROCESS EVENT
public void actionPerformed(ActionEvent e)
//WHICH BUTTON CAUSED THE EVENT?
if(e.getSource() == answerButton)
cardSelector.last(cardDeck);
cardDeck.setSize(600,600);
}//END if STATEMENT
}//END actionPerformed()
}//END ButtonHandler CLASS
}//END RegressInput CLASSHere is main:
import javax.swing.JFrame;
public class TestSharpStats
public static void main(String[] args)
//DEFINE FRAME OBJECT
RegressInput window = new RegressInput("Hi"); //SETS TITLE BAR
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //CLOSES WINDOW
window.setSize(400, 600); //SET FRAME SIZE
window.setResizable(true); //PREVENTS USER FROM RESIZING WINDOW
window.setVisible(true); //SETS window TO VISIBLE
}//END main()
}//END TestSharpStats CLASSmuit-post: http://forum.java.sun.com/thread.jspa?messageID=4442652
-
Hi everyone!
I can't seem to get this to work! I want the text on the radio buttons to wrap correctly as they reach the end of the stage (right now they just keep going forever. Here is the code I am using:
package {
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFieldAutoSize;
import flash.events.Event;
import fl.controls.RadioButton;
import fl.controls.RadioButtonGroup;
public class QuizQuestion extends MovieClip {
private var question:String;
private var questionField:TextField;
private var choices:Array;
private var theCorrectAnswer:int;
private var theUserAnswer:int;
//variables for positioning:
private var questionX:int = 25;
private var questionY:int = 150;
private var answerX:int = 25;
private var answerY:int = 200;
private var spacing:int = 25;
public function QuizQuestion(theQuestion:String, theAnswer:int, ...answers) {
//store the supplied arguments in the private variables:
question = theQuestion;
theCorrectAnswer = theAnswer;
choices = answers;
//create and position the textfield (question):
questionField = new TextField();
questionField.width = 775;
questionField.wordWrap = true;
questionField.multiline = true;
questionField.text = question;
//trace (questionField.width);
questionField.autoSize = TextFieldAutoSize.LEFT;
questionField.x = questionX;
questionField.y = questionY;
addChild(questionField);
//Text Format for radio buttons
var txtFmt:TextFormat = new TextFormat();
txtFmt.font = "Arial";
txtFmt.blockIndent = 2;
txtFmt.color = 0x000000;
txtFmt.size = 11;
txtFmt.leading = 4;
//create and position the radio buttons (answers):
var myGroup:RadioButtonGroup = new RadioButtonGroup("group1");
myGroup.addEventListener(Event.CHANGE, changeHandler);
for(var i:int = 0; i < choices.length; i++) {
var rb:RadioButton = new RadioButton();
rb.setStyle("textFormat", txtFmt);
rb.textField.autoSize = TextFieldAutoSize.LEFT;
rb.label = choices[i];
rb.group = myGroup;
rb.value = i + 1;
rb.x = answerX;
rb.y = questionY + questionField.height + 25 + (i * spacing);
addChild(rb);
private function changeHandler(event:Event) {
theUserAnswer = event.target.selectedData;
public function get correctAnswer():int {
return theCorrectAnswer;
public function get userAnswer():int {
return theUserAnswer;
As you can see, I managed to get the text field style of the radio buttons to use "txtFmt" as the style:
rb.setStyle("textFormat", txtFmt);
The issue:
If I add:
rb.textField.width = 352;
rb.textField.height = 60;
rb.textField.multiline = rb.textField.wordWrap = true;
inside the "for loop" that creates the radio button, it just makes my text go all crazy! It only extends the text about 30 pixels after the radio button and then starts wrapping it, making it all stack on top of each other. How can I make it create the radio button, show the text on the text field, wrap around once it reached the edge of the stage and the continue the next button.
thank you in advanced,
Rafa.Kglad,
I added the trace command to the 1st frame of my FLA, and it shows the "test" message on the output window.
I am looking thru my code, but can't figure what could be overwritting it. This is what I have on the first AS file:
package {
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFieldAutoSize;
import flash.events.Event;
import fl.controls.RadioButton;
import fl.controls.RadioButtonGroup;
public class QuizQuestion extends MovieClip {
private var question:String;
private var questionField:TextField;
private var choices:Array;
private var theCorrectAnswer:int;
private var theUserAnswer:int;
//variables for positioning:
private var questionX:int = 25;
private var questionY:int = 150;
private var answerX:int = 25;
private var answerY:int = 200;
private var spacing:int = 25;
public function QuizQuestion(whichQuestion:int, theQuestion:String, theAnswer:int, ...answers) {
//store the supplied arguments in the private variables:
question = theQuestion;
theCorrectAnswer = theAnswer;
choices = answers;
//Text Format for readio buttons
var txtFmt:TextFormat = new TextFormat();
txtFmt.font = "Arial";
txtFmt.blockIndent = 2;
txtFmt.color = 0x000000;
txtFmt.size = 12;
txtFmt.leading = 4;
//create and position the textfield (question):
questionField = new TextField();
questionField.width = 770;
questionField.wordWrap = true;
questionField.multiline = true;
questionField.text = question;
//trace (questionField.width);
questionField.autoSize = TextFieldAutoSize.LEFT;
questionField.x = questionX;
questionField.y = questionY;
questionField.setTextFormat(txtFmt);
addChild(questionField);
//create and position the radio buttons (answers):
var myGroup:RadioButtonGroup = new RadioButtonGroup("group1");
myGroup.addEventListener(Event.CHANGE, changeHandler);
var rbY:Number = 100;
for(var i:int = 0; i < choices.length; i++) {
var rb:RadioButton = new RadioButton();
rb.setStyle("textFormat", txtFmt);
rb.textField.width = 352;
rb.textField.autoSize = "left";
rb.textField.multiline = rb.textField.wordWrap = true;
rb.textField.autoSize = TextFieldAutoSize.LEFT;
rb.label = choices[i];
rb.group = myGroup;
rb.value = i + 1;
rb.x = 300;
rb.y = rbY;
rbY = rb.y+rb.height;
addChild(rb);
private function changeHandler(event:Event) {
theUserAnswer = event.target.selectedData;
public function get correctAnswer():int {
return theCorrectAnswer;
public function get userAnswer():int {
return theUserAnswer;
This is the AS that creates the questions:
package {
import flash.display.MovieClip;
import fl.controls.Button;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
public class QuizApp extends MovieClip {
//for managing questions:
private var quizQuestions:Array;
private var currentQuestion:QuizQuestion;
private var currentIndex:int = 0;
//the buttons:
private var prevButton:Button;
private var nextButton:Button;
private var finishButton:Button;
//scoring and messages:
private var score:int = 0;
private var status:TextField;
public function QuizApp() {
quizQuestions = new Array();
createQuestions();
createButtons();
createStatusBox();
addAllQuestions();
hideAllQuestions();
firstQuestion();
private function createQuestions() {
quizQuestions.push(new QuizQuestion(1, "1. Which of the following statements about the government auditor’s use of audit standards is least accurate? ",
1,
"Government auditors may be subject to a variety or range of audit standards.",
"Government auditors are not subject to audit standards for some types of work.",
"If the audit organization follows The Institute of Internal Auditors’ (IIA’s) International Standards for the Professional Practice of Internal Auditing (Standards), those Standards prevail over laws and regulations.",
"Different sets of audit standards that might be followed have many similarities."));
private function createButtons() {
var yPosition:Number = stage.stageHeight - 125;
prevButton = new Button();
prevButton.label = "Previous";
prevButton.x = 30;
prevButton.y = yPosition;
prevButton.addEventListener(MouseEvent.CLICK, prevHandler);
addChild(prevButton);
nextButton = new Button();
nextButton.label = "Next";
nextButton.x = prevButton.x + prevButton.width + 40;
nextButton.y = yPosition;
nextButton.addEventListener(MouseEvent.CLICK, nextHandler);
addChild(nextButton);
finishButton = new Button();
finishButton.label = "Finish";
finishButton.x = nextButton.x + nextButton.width + 40;
finishButton.y = yPosition;
finishButton.addEventListener(MouseEvent.CLICK, finishHandler);
addChild(finishButton);
private function createStatusBox() {
status = new TextField();
status.autoSize = TextFieldAutoSize.LEFT;
status.y = stage.stageHeight - 80;
addChild(status);
private function showMessage(theMessage:String) {
status.text = theMessage;
status.x = (stage.stageWidth / 5) - (status.width / 5);
private function addAllQuestions() {
for(var i:int = 0; i < quizQuestions.length; i++) {
addChild(quizQuestions[i]);
private function hideAllQuestions() {
for(var i:int = 0; i < quizQuestions.length; i++) {
quizQuestions[i].visible = false;
private function firstQuestion() {
currentQuestion = quizQuestions[0];
currentQuestion.visible = true;
private function prevHandler(event:MouseEvent) {
showMessage("");
if(currentIndex > 0) {
currentQuestion.visible = false;
currentIndex--;
currentQuestion = quizQuestions[currentIndex];
currentQuestion.visible = true;
} else {
showMessage("This is the first question, there are no previous ones");
private function nextHandler(event:MouseEvent) {
showMessage("");
//This will not allow the user to continue forward unless they answer the current question
/* if(currentQuestion.userAnswer == 0) {
showMessage("Please answer the current question before continuing");
return;
if(currentIndex < (quizQuestions.length - 1)) {
currentQuestion.visible = false;
currentIndex++;
currentQuestion = quizQuestions[currentIndex];
currentQuestion.visible = true;
} else {
showMessage("That's all the questions! Click Finish to Score, or Previous to go back");
private function finishHandler(event:MouseEvent) {
showMessage("");
var finished:Boolean = true;
for(var i:int = 0; i < quizQuestions.length; i++) {
if(quizQuestions[i].userAnswer == 0) {
finished = false;
break;
if(finished) {
prevButton.visible = false;
nextButton.visible = false;
finishButton.visible = false;
hideAllQuestions();
computeScore();
} else {
showMessage("You haven't answered all of the questions");
private function computeScore() {
for(var i:int = 0; i < quizQuestions.length; i++) {
if(quizQuestions[i].userAnswer == quizQuestions[i].correctAnswer) {
score++;
showMessage("You answered " + score + " correct out of " + quizQuestions.length + " questions.");
I also have a timer running on my FLA, but even if I comment out the timer, I still get the same issue.
thank you for your help,
Rafa. -
Module Pool Programming - Radio Buttons & Screen Field Invisible or Display
Hi,
I have 2 radio buttons in my screen and both of them are checked or on. Not sure how to make one of them is on and other is off at a time. If A is off, i need to make few screen fields invisible or display. if A is on, i need to make the screen field invisible or input enabled.
Can you please suggest me a suitable way to accomplish this task.
Appreciate Your Help in Advance.
Thanks,
Kannanhi
try this
go to SE38 create a program of type M
go to SE51,give a screen no (ex : 0800) and click on create
then click on Layout in se51
in the Layout select the Radiobutton icon and drag/drop it on the layout
Define them as by double clicking on the radiobutton icon
First Radiobutton name : RB1, Groups : u can see 4 boxes,in the first box give group as G1
do the same for the Second Radiobutton RB2.
Now select both the radiobuttons RB1,RB2 both at a time and right click the cursor
Radiobutton - Define.
Then drag and drop a i/o field name : wk_name. save & activate the layout.
in se51
PBO
Module_status_0800.
Module_screen_modif.
PAI
Module_user_command_0800.
in se38
data : wk_name(10) type c.
data : rb1,rb2.
Module_screen_modif_o/p.
if RB1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'WK_NAME'.
SCREEN-INPUT = '1'.
SCREEN-INVISIBLE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
if RB2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'WK_NAME'.
SCREEN-INPUT = '0'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endmodule.
Module_user_command_0800.
case sy-ucomm.
when 'EXIT' or 'BACK' or 'CANCEL'.
LEAVE PROGRAM.
endcase.
Endmodule.
Regards -
Text field highlight problem after caret position is set
Hi,
What I am trying to do is: set caret position and then highlight the text after it. The problem is: if I set caret position first, and highlight the rest of the text, the caret position is then set at the end of the entire text; if I highlight text first, and set caret position, then the text is not highlighted.
I am wondering how I can achieve this. Thanks.
The simple test program is below:
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JTextField;
public class TestTextFieldHighlight {
public static void main(String[] args) {
JFrame f = new JFrame("Text Field Examples");
f.getContentPane().setLayout(new FlowLayout());
JTextField tf = new JTextField("SampleTextField", 20);
tf.setEditable(true);
f.getContentPane().add(tf);
tf.setCaretPosition( 5 );
tf.setSelectionStart( 6 );
tf.setSelectionEnd( tf.getText().length() );
//tf.setCaretPosition( 5 );
f.pack();
f.setVisible(true);
}//tf.setCaretPosition( 5 );
tf.setCaretPosition( tf.getDocument().getLength() );
tf.moveCaretPosition(6);
//tf.setSelectionStart( 6 );
//tf.setSelectionEnd( tf.getText().length() ); -
JDialog Disable button Text field Empty
Hi,
How can I disable the send button if the JText field is empty in JDialog box.
Thanks in advance
BalaapThere is no need to post the same question twice in the same forum and please do not cross post.
-
JDialog Diable button Text field Empty
Hi,
How can I disable the send button if the JText field is empty in JDialog box.
Thanks in advance
BalaapThere is no need to post the same question twice in the same forum and please do not cross post.
-
Radio buttons---deactivate fields
Hi
plz can anyone suggest code for
by selecting on radiobutton automatically some feilds(or sel-screen blocks) will be deactivated. with out f8
how can i achieve this..Hi
Try this out
**selection screen
PARAMETER p_tab TYPE dd02l-tabname .
SELECT-OPTIONS s_date FOR sy-datum NO-EXTENSION MODIF ID grp.
PARAMETER p_fname1(5) TYPE c .
SELECT-OPTIONS s_gjahr FOR MSEG-MJAHR NO-EXTENSION MODIF ID GP1 .
PARAMETER: p_sum RADIOBUTTON GROUP gid USER-COMMAND flag,
p_det RADIOBUTTON GROUP gid.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_sum = 'X'.
IF screen-group1 = 'GRP'.
screen-input = 0.
clear: s_date[].
MODIFY SCREEN.
ENDIF.
ELSEIF p_det = 'X'.
IF screen-group1 = 'GP1'.
screen-input = 0.
clear: s_gjahr[].
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP. -
Radio buttons breaking validation
Hi all,
I have a major problem with a form in that, bizarrely, radio buttons are breaking the validation of mandatory fields throughout the form.
On trying everything to narrow down what the issue is, strangely this seems to be it. For example, mandatory fields validate up until the first instance of a radio button in the form, where all other successive mandatory fields fail to validate after it. Simply moving a working field to after that first instance of a radio button in the hierarchy breaks it.
Validation is run through a custom submit button using execValidate.
Form elements (including radio buttons, text fields, validation/submit buttons, etc.) have been tested independently, and frustratingly, work when lifted into a new document. Therefore there must be something else in the form that's making it fail. Recreating the form isn't really an option due to it's complexity and size.
Any help would be massively appreciated.
Thanks
EDIT: Fixed. After whittling the form down to bare bones and going though the XML line by line (ouch), turns out the only real different thing between my original (broken) form and a new (working) test form was the target version. So changed back to 9.1. Curious, as using Acrobat XI ...
Message was edited by: JdLHi all,
I have a major problem with a form in that, bizarrely, radio buttons are breaking the validation of mandatory fields throughout the form.
On trying everything to narrow down what the issue is, strangely this seems to be it. For example, mandatory fields validate up until the first instance of a radio button in the form, where all other successive mandatory fields fail to validate after it. Simply moving a working field to after that first instance of a radio button in the hierarchy breaks it.
Validation is run through a custom submit button using execValidate.
Form elements (including radio buttons, text fields, validation/submit buttons, etc.) have been tested independently, and frustratingly, work when lifted into a new document. Therefore there must be something else in the form that's making it fail. Recreating the form isn't really an option due to it's complexity and size.
Any help would be massively appreciated.
Thanks
EDIT: Fixed. After whittling the form down to bare bones and going though the XML line by line (ouch), turns out the only real different thing between my original (broken) form and a new (working) test form was the target version. So changed back to 9.1. Curious, as using Acrobat XI ...
Message was edited by: JdL
Maybe you are looking for
-
X does not start automatically after xorg update (1.16)
Hello, Yesterday after a system update and a reboot, my screen stayed desperatly black. Then I logged in to a console as root and started X by doing: systemctl isolate multi-user.target systemctl isolate graphical.target This means root can start X.
-
Hi, In a PO, a pricing proceedure had been determined based upon the vendor schema group. Later on if we change the vendor schema group in the vendor master record, is there any possibility to effect new pricing proceedure in the same PO. Thanks in
-
Who has successfully created a SCORM compliant captivate course with AS3?
Hi Everyone, I would really like to know your experiences with publishing courses using the AS3 settings... Have your courses successfully been published and used on an LMS? Is the tracking working for you? If yes, what settings do you use? (besides
-
Any example to add favicon to apex app?
Hi, gurus: I need to add a favicon to my apex app. I came across the discussions, and just know I need to to add some code to template. Is this template under shared components-->theme? Would anyone show me an example? Thanks. Sam
-
How to update AIR SDK for Flash Pro CC?
The most recent info I can find is for Flash Pro CS6: http://helpx.adobe.com/x-productkb/multi/overlay-air-sdk-flash-professional1.html Does this work in Flash Pro CC?