Set active cursor position
Hi,
I'm trying to set the value of a cursor in a xy graph, but the value that I write is different that the one I read, like you can see in the picture.
Does anyone know why?
Thanks for your help,
Sílvia
Attachments:
cursorPosition.JPG 56 KB
Strange!!
I attach the program, if you can run the program.
I don't know if you will understand everything, but in principle you
only need to press start and add the files that are in "Tests.zip".
Once again thank you,
Sílvia
Attachments:
Sonic.zip 299 KB
Tests.zip 274 KB
Similar Messages
-
How to set a cursor position in OALV Reports
Hi Experts,
I have a created an OALV report and in the output field i've added drop down list with 2 values and for the drop downlist i've added a Double click event.
when i select a value from the drop down list and double clicking the field the value beside the next field should be updated this is my requirement.
But when i double clicking the field and coming back to the screen the cursor position is going to first position.
i'm using REFRESH_TABLE_DISPLAY for to update my internal table.
But i want the cursor positioned where i double clicked.
so please help me.
Regards,
Rathan.Before
CALL METHOD <ref.var. to CL_GUI_ALV_GRID>->refresh_table_display
EXPORTING
IS_STABLE = <structure of type LVC_S_STBL.
in parameter IS_STABLE set fields row and col to 'X'.
If the problem persists, use [get_current_cell|http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b552fad30911d2b467006094192fe3/frameset.htm] in PAI/event handler and [set_current_cell_via_id|http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b55327d30911d2b467006094192fe3/frameset.htm] after [refresh_table_display|http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b5531ed30911d2b467006094192fe3/frameset.htm]
Regards,
Raymond -
Setting the cursor position in a field in XD01 transaction
Hi,
I am trying to validate the field Customer type (Path : XD01 > Sales area data > Extras > Additional data) in the transaction XD01 ie: It is a mandatory entry for Customer creation.
I tried displaying an error message which worked fine. But i want the cursor to be positioned in the Customer type field.
Is there any possibility for this?Santhosh,
I tried giving "GET CURSOR FIELD v_field LINE v_line" in the exit EXIT_SAPMF02D_001. But no values are getting captured in those variables.
Moreover they have specified in the documentation as - "However, the variables specified during PAI processing are always initialized". Now this exit is getting called during PAI. Hence i believe that the values will be initialized! Moreover i think that getting the field & line information of the current cursor position is not going to help us! -
Can any body answer this-Want to set the cursor position in textfield.
i want my cusor position in textfield at the initial position which will come by default.
but when i'm using the textfields in an inner class i'm getting the cursor position at the end of the text in text filed.pls can any body answer this.
thanks in advance.
if want run this example.
import java.awt.*;
import java.awt.event.*;
class Testing extends JFrame implements ActionListener
Container cnt;
JButton jd;
JTextField jt1;
JTextField jt2;
Testing()
cnt = getContentPane();
cnt.setLayout(new FlowLayout());
jd = new JButton("OK");
//jd.setBounds(50,50,100,30);
cnt.add(jd);
jd.addActionListener(this);
public void actionPerformed(ActionEvent ae)
Object but = ae.getSource();
System.out.println("in action 00000");
if(but.equals(jd))
System.out.println("in action ");
call();
return;
void call()
System.out.println("in action 1111111111");
Inner inn = new Inner();
inn.jdlg.show();
public static void main(String s[])
JFrame jf = new Testing();
jf.setSize(200,200);
jf.show();
class Inner
JDialog jdlg;
//JTextField jt1;
//JTextField jt2;
Container cnt;
Inner()
jdlg = new JDialog();
JLabel jla = new JLabel("Label");
jt1 = new JTextField();
jt2 = new JTextField(5);
cnt = jdlg.getContentPane();
cnt.setLayout(new FlowLayout());
cnt.add(jt1);
cnt.add(jt2);
jt1.setText("aaaaaaaa");
jt2.setText("bbbbbbbb");
System.out.println("the text "+jt1.getText());
jdlg.setSize(200,200);JTextFiled.setCaretPosition(0);
-
[ADF Faces] set cursor position to the first column input text in ADF table
How do i set the cursor position to the first column input text when i Insert a blank row?
My idea is to implement using javascript. document.setfocus() but how do i do it from the backing bean code? or how do i install custom js to call document.setfocus()?
any ideas?
Message was edited by:
user450391Did you try by iterating the selected row?
Bind the table with the managed bean and then try with below code:
RichTable empTable;
RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys();
Iterator selectedEmpIter = selectedEmps.iterator();
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding empIter = bindings.findIteratorBinding("EmpView1Iterator");
RowSetIterator empRSIter = empIter.getRowSetIterator();
while(selectedEmpIter.hasNext()){
Key key = (Key)((List)selectedEmpIter.next()).get(0);
Row currentRow = empRSIter.getRow(key);
System.out.println(currentRow.getAttribute("Ename")); -
Problem when setting cursor position property
I'm trying to use property nodes to set the cursor position programmatically, following an arrow keypress. When my actual data file plotted, the position assignment doesn't work properly. If I clear the data from the graph (right click, clear graph), then the cursor responds properly. I've attached a zipped file with VI that demonstrates the problem. Sorry the file is large--I had to include my data file to properly demonstrate the problem.
Thanks for any advice that help me clear this up,
Allan
Solved!
Go to Solution.
Attachments:
My Source Distribution.zip 541 KBbracker wrote:
I'm trying to use property nodes to set the cursor position programmatically, following an arrow keypress. When my actual data file plotted, the position assignment doesn't work properly. If I clear the data from the graph (right click, clear graph), then the cursor responds properly. I've attached a zipped file with VI that demonstrates the problem. Sorry the file is large--I had to include my data file to properly demonstrate the problem.
Thanks for any advice that help me clear this up,
Allan
Include this code in 'Initialize' state.
I am not allergic to Kudos, in fact I love Kudos.
Make your LabVIEW experience more CONVENIENT. -
I ahve a program written and all but it looks like I distorted the cursor position. I want to set the cursor position to where it can be moved by clicking and i cant figure it out. I know i have the magnify on is that why if so is there a way to keep both.
Attachments:
windchime2.vi 53 KBPress Here.
Tim
Johnson Controls
Holland Michigan -
Can set the cursor in next line when user inputted one record?table control
For Dnypro Table control
I just know when data check error, we can set the cursor to the error field of current line.
Now user hope that after they inputted the data of one record, he enter the [ENTER], the cursor can be set to the next new line's first field.
I tried to use such as
[SET CURSOR FIELD 'WA_XXXX-XXXXX' LINES 5.].
But if no any error , the cursor will be automatically setted to the field which setted at Cursor position in Dnypro's attribution
Can it be realized?
Thanks.try to use same procedure as when you program page down:
DATA: ITAB_LINES LIKE SY-TABIX,
FIRST_LINE LIKE SY-TABIX,
J LIKE SY-TABIX.
GET CURSOR FIELD CURSOR_FIELD. "to see what Loop is selected
DESCRIBE TABLE IRE05 LINES ITAB_LINES.
RE05-LINES = ITAB_LINES.
WHEN 'P+'.
FIRST_LINE = RE05-TOP_LINE + LOOPLINE_IRE05.
-> FIRST_LINE = RE05-TOP_LINE + 1.
J = RE05-LINES - LOOPLINE_IRE05 + 1.
IF J LE 0.
J = 1.
ENDIF.
IF FIRST_LINE LE J.
RE05-TOP_LINE = FIRST_LINE.
ELSE.
RE05-TOP_LINE = J.
ENDIF.
Edited by: Andreas Mann on Feb 28, 2008 11:46 AM -
I have just completed creating 3 forms with 60+ text fields each with Acrobat X. To my dismay, I've discovered that when one types in the text field, the text appears in the middle (left justified) of the text box instead of at the top.
How can I fix this/set the cursor position?
Thanks!You need to change the text field(s) to multi-line text fields. This is found within the text field properties dialog in the options tab.
Andrew -
Cursor Position in text item - almost there
Searching the forum I found a post relating to the same problem I am facing but still without solution. The text was :
"Q:Does anyone know of a way to add a value from a LOV into a text editor, inserting the value at the current cursor position (ie. possibility in the middle of lines of text)."
Mr. Duncan Mills replied the following but it didn't worked:
"1) Set Keep Cursor position on in the text field
2) Have the LOV return into a "working field" possibly hidden
3) Aftre the LOV has returned a value do a Go_ITEM to the working feild and issue SELECT_ALL; COPY_REGION;
4) GO_ITEM back to the text Field (the cursor should return to where you left it) and PASTE_REGION."
I was trying this and I finally found solution just changing "paste_region" to "win_api_shell.sendkeys(whnd,'^V',FALSE)". It's working, but I am getting the message FRM-41008 - Undefined function key.
How can I disable this message ? (I tried to set :system.message_level to 25 but it didn't work).You can trap error messages like that in a Re: Error Trapping
-
SetCaretPosition doesnt set the cursor back to the jTextPane
I have dynamic textpanes getting generated. I validate the textpane when moving to the other textpane during focus lost event. If there is an error, i need to set the cursor position back to the starting of the textpane. I am using setCaretPosition(0), but doesnt set the cursor back to the textpane. is there anything i am missing?
focusLostTextPane.setCaretPosition(0);
Thanksthank you so much.
The requestFocusInWindow() does work but i observed one more thing. when i tab over the jtextpanes for the first time, it works fine. but when i move the tab once again from jtextpane1 to the next jtextpane, caretposition is set fine to the next textpane, but the focus is not set. i noted that this might be happening because the jscrollpane is not moving. do i have to change anything in jscrollpane? -
Hi all ,
I have doubt while uploading data for transaction XD02 (customer master).I have recorded the transaction. now while uploading the data from a file it gives error. the error is at filling the table control for contact details for the customer.the cursor positon is recorded but while uploading the cursor position is not read.this happens when there is no value for the table control to be filled if there is any value for the table control in the file there is no error.why is it not taking the cursor positon when there is no value in the the file for that particular row of the table control .kindly help.
Thanks ,
mahesh.How to set the CURSOR position in jTable .changeSelection(....);
The text in the cell where cursor is present should be selected . You can do this by placing the cell directly into edit mode when it is selected:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=640471 -
Dampening/smoothing cursor position
I'm designing a touch screen interface. One problem is that
the cursor tends to jitter based on the small variations of
pressure a finger puts on the screen. Is there a way to dampen or
smooth small variations of the cursor position?How to set the CURSOR position in jTable .changeSelection(....);
The text in the cell where cursor is present should be selected . You can do this by placing the cell directly into edit mode when it is selected:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=640471 -
Pls help me for the following query:
how to set cursor position at the beginning of text field(JTextField) after setting text inside it.RTFM
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/text/JTextComponent.html#setCaretPosition(int) -
The code to set focus and cursor position fails in a mobile browser
In two previous discussions (http://scn.sap.com/message/15176399 and http://scn.sap.com/message/15205348) I received help on how to set the focus on an OpenUI5 mobile input field and then how to position the cursor at the end of any text that might be in that field.
That all works well in desktop browsers (Chrome, Firefox and IE10).
However that same code seems to fail when I test it on browsers on mobile devices. At first I thought this was working in Chrome on an iPad but now it does not (could our taking new OpenUI5 code recently affected that?). I do not think I have ever see this work in Chrome on a, Android tablet.
Has anyone had success setting the focus and cursor position on a mobile input field running in a mobile environment?Wasn't sure where to turn with this problem. There is talk on the web that there is a problem in Chrome on Android and that this will be fixed in version 37. We I get that version I will try and update this post.
Maybe you are looking for
-
Small images not showing in design view
Desperate for help! I've been trying to diagnose this for a long time. For some strange reason, images that used to show up in my design view are now displaying the 'missing image' icon. I've narrowed it down to this--if the image is less than 8px hi
-
Index used or not for selecting data from ODS in a start routine
Dear friends, In the start routine of the update rules to a cube, I am reading some data of an ODS in to an internal table . The ODS is indexed. But, I am not sure if the index is at all used in the Select statement (that gets the data from ODS to th
-
Last night Chrome and Google 1+ locked down my pc because I disconnected plus one. I could not even get to Norton. This morning I talked to Norton and they moved my system to FF, I have two accounts Donnie p grant and Donnell Grant. I play Mafia Wars
-
Workflow fo returned sales order modified from updating the billing block t
please tell me how to find returned sales order modified from updating the billing block to delivery block and how to create blocks here.i want to know updating means what is happening here.
-
I erased and then encrypted a 1TB Western Digital USB drives to use as Time Machine backups. It worked for awhile then Time Machine told me that there was an error in backing up that might be temparary and that I should try again later. So, I tried