Questions tagged [cursor]

DO NOT USE. This tag is ambiguous. For database cursors (that let you traverse records), use the [database-cursor] tag. For mouse cursors (onscreen pointer to let you know where the mouse is), use [mouse-cursor]. For text-cursors (blinking vertical bar to let you know where text will be input), use [caret].

cursor can mean many things, and it is recommended to use more specific tags.

  • For database cursors (that let you traverse records), it is better to use .
  • For mouse cursors (onscreen pointer to let you know where the mouse is), it is better to use .
  • For text-cursors (blinking vertical bar to let you know where text will be input), it is better to use .

For the database concept, quoting from the wikipedia page:

In computer science and technology, a database cursor is a control structure that enables traversal over the records in a database. Cursors facilitate subsequent processing in conjunction with the traversal, such as retrieval, addition and removal of database records. The database cursor characteristic of traversal makes cursors akin to the programming language concept of iterator.

Cursors are used by database programmers to process individual rows returned by database system queries. Cursors enable manipulation of whole result sets at once—a capability that most procedural programming languages lack. In this scenario, a cursor enables the rows in a result-set to be processed sequentially.

And for the user-interface concept, again from the wikipedia page:

In computing, a cursor is an indicator used to show the position on a computer monitor or other display device that will respond to input from a text input or pointing device. The flashing text cursor may be referred to as a caret in some cases.

8060 questions
540
votes
6 answers

How do I turn off the unlimited whitespace in IntelliJ editor?

How do I remove the ability to move the cursor after then end of line in IntelliJ?
Joshua
  • 24,418
  • 22
  • 74
  • 106
366
votes
8 answers

How to get the focused element with jQuery?

Using jQuery, how can I get the input element that has the caret's (cursor's) focus? Or in other words, how to determine if an input has the caret's focus?
dave
  • 12,827
  • 23
  • 66
  • 104
297
votes
10 answers

What's the best way to iterate an Android Cursor?

I frequently see code which involves iterating over the result of a database query, doing something with each row, and then moving on to the next row. Typical examples are as follows. Cursor cursor = db.rawQuery(...); cursor.moveToFirst(); while…
Graham Borland
  • 57,578
  • 20
  • 131
  • 176
279
votes
10 answers

How can I make the cursor turn to the wait cursor?

How can I display the Wait/Busy Cursor (usually the hourglass) to the user to let them know the program is doing something?
Malfist
  • 29,255
  • 58
  • 174
  • 263
234
votes
16 answers

Change UITextField and UITextView Cursor / Caret Color

I'm wondering about changing the color of the cursor / caret in a UITextField (And UITextView if its the same answer) in iOS. I've seen answers for OSX development, but nothing for iOS. Is this even possible?
RileyE
  • 10,308
  • 12
  • 60
  • 103
217
votes
11 answers

Change cursor to hand when mouse goes over a row in table

How do I change the cursor pointer to hand when my mouse goes over a in a
Zeeshan Rang
  • 17,525
  • 27
  • 65
  • 96
207
votes
2 answers

How can I increase the cursor speed in terminal?

How can I increase the cursor speed in terminal? I have Mac OS X by the way. It would also be interesting to know it for Linux. I don't know what I should search for in Google (or what you like).
classic_programmer
  • 2,073
  • 2
  • 13
  • 4
187
votes
7 answers

CSS for grabbing cursors (drag & drop)

I have a JavaScript webapp where the user needs to grab the background to move the whole screen around. So I want the cursor to change when they're hovering over the background. The -moz-grab and -moz-grabbing CSS cursors are ideal for this. Of…
at.
  • 45,606
  • 92
  • 271
  • 433
179
votes
17 answers

SQL Call Stored Procedure for each Row without using a cursor

How can one call a stored procedure for each row in a table, where the columns of a row are input parameters to the sp without using a Cursor?
Johannes Rudolph
  • 34,073
  • 12
  • 105
  • 164
174
votes
4 answers

How to get the caret column (not pixels) position in a textarea, in characters, from the start?

How do you get the caret position in a
NameAge
Jennifer