How to control the cursor position on a text item..
Hello,
How can we control the cursor position programmatically on a text item.
i.e. how do we move the cursor to home or end of the text item.
TIA,
Hiten
If you have an access to metalink.oracle.com, take a look at notes:
Note 61656.1 (V45) HIGHLIGHTING A REGION OF TEXT
Note 131028.1 Default Highlighting in Forms (Client Server)
and threads from metalink forum:
531481.996 "Select_All not working in 6.0.8.25.2", 153092.995 "Text item cursor position"
Similar Messages
-
How to control the cursor position in the Table control in Module pool
Hi,
Can any body tell me how to change the cursor positon from last field of the first record to the
first field of the second record , when user presses enter in the last field in the module pool
programming.
ThanksHi,
Please avoid posting duplicate posts.
Re: how to get the cursor position from screen in module pool program
Nag -
Controling the cursor position
Hi all,
I have two x, and y signal outputs from a dll module and I plan to use them to control the cursor position. One problem I'm facing is that my signals are variable enough to cause the cursor to vibrate in stationary setting. So, I use hysterysis (putting threshold) to eliminate these fluctuations but the drawback is that keeping the treshold high enough to eliminate the fluctuations keeps me from getting a nice, smooth movement when the speed of movement (rate of x and y changing) is low. Any ideas or suggestions will be appreciated.
p.s. I am using "SetCursorPos".dll as you might have already guessed.
Thank you,
ElnazThe formula for an exponential filter of degree D is the following:
New Average = (New Value + (D-1)*Old Average)/D
I usually add a special case for startup so that D is never greater than the number of points.
As I said, it is a low-pass filter, much like using a running average. I usually like it because the state is simply a single value (Old Average) instead of the array of values you have to keep around to do a running average.
As to the new question of separating high-frequency noise from your high-frequency signal, that is a bit more complicated (obviously). You should take a power spectrum of the noise to see if there is a characteristic feature you can use (cutoff frequency, strong peaks). -
How to get the cursor position in the text edit box?
Hi, all.
I want to get the cursor position in the text edit box
to insert some data.
But I don't know how to get.
Can someone give me some advice?
BestRegard.
Miya.Hi Miya,
Write your own textSelectionSuite for this.
and use ITextTarget->GetRange() function.
Thanks and Regards,
Yopangjo. -
How to get the cursor position on a picture?
I'd like to show the cursor position on a picture
which is 400 by 400 pixel size and located at
(0, 0, 400, 400) on a panel. So suppose that the
cursor is at (50, 50), how can the java code know?
Thank you.I am thinking about this, and use something like
JPanel.setFocusable(true). Thank you. -
Can I control the cursor position
I'd like to confine the cursors position to a grid when it's within a particular panel. I tried public void mouseMoved(MouseEvent e)
int x = (int) (GRIDSIZE*java.lang.Math.round(e.getX()/(1.0*GRIDSIZE)));
int y = (int) (GRIDSIZE*java.lang.Math.round(e.getY()/(1.0*GRIDSIZE)));
e.translatePoint(x,y);
} But that didn't work. Can it be done?I'm not exactly sure what you want to be done, but, if you want to control the mouse position, you can create a Robot object (check the class in the java docs) and use robot.mouseMove(mouseX,mouseY) where mouseX and mouseY are integers. THIS ONLY WORKS IN APPLICATIONS THOUGH. its too powerful to be able to control a persons mouse, (and keyboard is controllable too with Robot), you can imageine what a person could do lol.. Anyway, you could repeatedly check if the mouse position is on the grid, and if it isn't, use robot.mouseMove, to place it onto the grid.
-
How to get the cursor position from screen in module pool program
Hi,
I am doing the module pool program, I have one table control in one screen.
I have to give functionality to the user that when the user enters first record in the table control and after filling the last field
when he presses enter the cursor will have to come in the starting field of the second record.
I know the logic , but i m bit confused.
Can any body help me to solve this....
thanksHi,
Check this code,
Write it in the PBO
MODULE SET_CURSOR_WERTKONTRAKT.
MODULE SET_CURSOR_WERTKONTRAKT OUTPUT.
PERFORM SET_CURSOR USING 'VBAP-ZWERT'.
ENDMODULE. " SET_CURSOR_WERTKONTRAKT OUTPUT
FORM SET_CURSOR USING US_FELDNAME.
DATA: DA_TFILL LIKE SY-TFILL.
DESCRIBE TABLE IVBAP LINES DA_TFILL.
FCODE 'Create Position':
==> Cursor to the first free line set to make the new position
Can be created directly
IF DA_TFILL EQ 0.
SET CURSOR FIELD US_FELDNAME LINE 1. -> set cursor position
ELSE.
SET CURSOR FIELD US_FELDNAME LINE 2.
ENDIF.
Product proposal actively
Set ==> cursor in the first row
IF DPP_ACTIVE EQ CHARX AND
XVBAP_UMFANG_OPV IS INITIAL.
in the 'target volume' if available
IF KOPGR_MIT_ZMENG CS TVAK-KOPGR.
SET CURSOR FIELD 'VBAP-ZMENG' LINE 1.
EXIT.
ELSE.
Else in the field 'Order quantity'
SET CURSOR FIELD 'RV45A-KWMENG' LINE 1.
EXIT.
ENDIF.
ENDIF.
Hope it helps you,
Regards,
Abhijit G. Borkar -
How to control the cursor location(without mouse control)??
Hi,
I am now developing a swing application which need to use a thread to change the cursor location.
Can the cursor location be controlled by a thread?
thankcan be done using class Robot
-
How to enter the data into data block text item which has an LOV associated
Hi,
I have a data block, one of the data block text item has an LOV assigned. when I populate this text item using the LOV and do "execute_query", it is taking the value in the text item and adding it to the search criteria, but when I enter a value manually in that text item and do "execute_query" it is showing me an alert(which I created) "Please enter a value".
My question is, why is not taking the value that I enter manually? Looks like before executing the query, this field is getting empty
How to avoid this problem and make sure that the value entered in the text item is added in the where clause of the query?
Any advice?
Thanks in advance
R.GProblem solved!
Before doing execute-query, all the text items are being cleared,so I used a global variable to store that value
Thanks anyway
R.G -
How to change the default position of context menu item? (C#)
Hi,
I have included a calendar context menu item with my Outlook Addin. But by default, its positioned at the last as shown in the picture below:
I need a way to make it as the fourth item instead of last one. Also, I want set an icon for the same. How can I do that?
Appreciate if you can give some sample examples.
Thanks in advance.
Thanks PrasadHello Prasad,
The
Customizing Context Menus in Office 2010 article in MSDN describes the basics.
You can specify the IdMso value of the built-in control after/before you need to insert your own:
<button id="MyBtn" label="MyButton" insertBeforeMso="OpenSelectedItems" />
See
Office 2013 Help Files: Office Fluent User Interface Control Identifiers
for IdMso values. -
Is it possible to locate the cursor position in a text item? in other words can I find the number of characters to the left of the cursor in a text item?
I really appreciate any kind of input on this.
nullI have to insert user selected variables that show up in a LOV into the text item at the cursor position.
A sloppy workaround for this problem is asking the user to put in a pre defined symbol where ever he/she wants to insert the variables and then replace the variable with the value selected from the LOV using the REPLACE function. There is always a chance of error here!
Instead if there is a way to know the cursor position, like the no. of characters to the left of the cursor or the cursor co-ordinates............. -
Photoshop CS5 - Control and navigate the cursor position automatically
Hello
I wonder if it’s possible with Photoshop CS5 (OS: Win7) to control and navigate the cursor position automatically?
Given: I have individual image coordinates for a set of locations.
Wanted: A possibility to position the cursor sequentially at those image location by the means of an external script or procedure.
Any ideas if that is possible with CS5?
Thanks for any help.
LarsAs far as I can tell with regard to a Photoshop Scripting approach: No.
Creating a Selection of certain dimensions and a certain position would be possible, though.
What exactly are you trying to achieve? -
I have following problem when I control the cursor via an attribute note, it is neccersary to free the cursor, but then it is not possible to read the y-Value of the cursor position. I want to control the cursor via keyboard and buttons, but with the funtionality of attribute setting "cursor fixed to plot".
You know the X position so just read the Y value by reading it straight from the Y array instead of from a property node...
Alternatively unlock the cursor if the position control has changed...and lock it again if it is constant for n milliseconds; to produce the Y value from the Y property.
MTO -
Is it possible to change the cursor position automatically when changing the language?
For example: when changing from English to Hebrew the cursor will move from the right end to the left?
Thanks,
AmnonI don't think this is possible in general, although some individual apps might do it. Normally you use a direction control from an app menu or at the system level.
http://support.apple.com/kb/PH14203 -
Is there a way to get the cursor position index of html text field
I'm trying to work on a text pad like MC with "insert text at
position X" and "find and replace" can anyone tell me how to find
the cursor index of an html text field. Selection.getBeginIndex() ,
Selection.getEndIndex(), Selection.getCaretIndex() as far as I know
these methods only work with text and not htmltext.
What I'm trying to do is assign different parts of the string
to variables so that I can combine them to reconstitute my html
string.enfantterrible:
If I understand correctly, you want the corresponding
position in the
htmlText propery of the caret index (which as you point out
is only the
position in the plain text version of the textfield content).
Below is how I would do it. Maybe there's an easier or more
efficient
way (using XML objects etc), but I don't know it. You could
conduct all
your string searches in the plain text and then convert the
result to
the html positions. I didn't build this to accept negative
parameters
for the pos parameter (e.g. from end of string backwards) but
the
function could be adapted to do this too if necessary. The
test data is
not proper html from a text field, but it doesn't really
matter what it
is so long as its formatted correctly. It just separates the
tags from
the content to enable apples with apples comparison.
//some test data
var testStringXML = "<format>Hel<b>lo i can't
t<i>ell you h</i>ow hap</b>py I
am.</format>";
var undecoratedString = "Hello i can't tell you how happy I
am.";
//the conversion function
function findDecoratedPosition(pos:Number, xmlString:String,
test:Boolean):Number {
//anything between '<' and '>' should be excluded from
plain text search.
//create an array of array elements (n=2) consisting of tag
then plain text
//requires correctly formatted xml/html
var tempArr:Array = xmlString.split("<");
for (var aa = 0; aa<tempArr.length; aa++) {
tempArr[aa] = tempArr[aa].split(">");
//remove the first and last elements of the new array (these
are empty)
tempArr.pop();
tempArr.shift();
//find the corresponding plaintext location and calculate
the "decorated" position
var retPos:Number = 0;
var posCount:Number = 0;
for (var aa = 0; aa<tempArr.length; aa++) {
retPos += tempArr[aa][0].length+2+tempArr[aa][1].length;
//+2 allows for missing < and >
posCount += tempArr[aa][1].length;
if (posCount>pos) {
return (retPos+(pos-posCount));
//out of range
return -1;
//test code:
for (var aa = 0; aa<undecoratedString.length; aa++) {
var altPos = findDecoratedPosition(aa, testStringXML);
trace(undecoratedString.charAt(aa)+" in position "+aa+"
plainText equates to position "+altPos+" in the decorated version
["+testStringXML.charAt(altPos)+"]");
}
Maybe you are looking for
-
How to find out the encoding of a file
How to findout the encoding of a file being read? Thanks in advance?
-
My itunes does not get the names of all tracks which i import.
When i import a cd into itunes, it does not get any track names. Why is this. Also, itunes does not connect to the music store. It tells me that i should check my connection etc etc. Are these problems related, and what can i do to fix it?
-
Dead drive, desperately trying to rescue files..
Hi, The SATA drive on my black Macbook has packed in without me backing up via TimeMachine.. (yes, we all learn from our mistakes the hard way, sooner or later, I guess) I'm desperately trying to retrieve whatever I can from it. There doesn't seem an
-
I am working on changing My ap1231's to Lwapp and ran into an issue. The upgrade of the 1231 works great, but when it goes to create the CSV file, it's empty. When I see the message that tells me to 'save' the CSV file, I clicked on 'config' and that
-
I have been using my iPhone 5's app Notes to dictate my inventory and send it to my computer rather than typing in everything... until today. The microphone icon in Notes is gray. I checked Messages and Mail to find that the microphone is operable w