cursor

Move Cursor One Word at a Time in UTextView

会有一股神秘感。 提交于 2019-12-07 07:52:52
问题 I would like to create a button that moves the cursor position in a UITextView one word at a time. From a user perspective, this would be the same as Option-Right Arrow in Mac OS X, which is defined as "go to the word to the right of the insertion point." I have found a couple ways to move on character at a time. How would you modify this to move one word at a time? - (IBAction)rightArrowButtonPressed:(id)sender { myTextView.selectedRange = NSMakeRange(myTextView.selectedRange.location + 1, 0

Shadow for custom mouse cursor

北城余情 提交于 2019-12-07 07:30:45
问题 On "newer" Windows systems there is an option to make the OS draw a shadow beneath the mouse cursor: However the custom cursors in my Delphi app don't show a shadow even if this setting is enabled. Do you have any idea how to arrange it so that Windows adds the shadow automagically? Or do I really have to check the user's preferences and conditionally draw the shadow myself like Mike Lischke did? (This is a question that has been bugging me and others for some time: Custom mouse cursor shadow

How to hide specific rows of a Cursor in android

跟風遠走 提交于 2019-12-07 06:45:43
问题 I have a cursor, and it got, lets say, 40 rows, I want to hide some rows when the user check a checkbox. one way is run the query again on the cursor, but it doesn't help me because the condition is done by Java (calculate balance, with many logic). I need something that will get the current row, and return if it can be show or not. any help will be appreciated. 回答1: i inherit CursorWrapper and override some of the methods, here is the code: public class SelectableCursorWrapper extends

get contacts performance issue

拜拜、爱过 提交于 2019-12-07 04:31:13
问题 I am trying to get contacts of the android device. I found a great sample code here However, when trying to populate a ListActivity with ArrayAdapter that is using that code it is taking a lot of time - almost 4 seconds on galaxy s2 and much more on older devices. I need to improve that performance. What I thought is to implements Cursor that will hold more than one dimension Cursor , and use SimpleCursorAdapter as the list adapter. I see few problems with this approach: I don't know how to

HTML Textarea - cursor starting in center of textarea rather than top

余生颓废 提交于 2019-12-07 04:13:58
问题 I have an HTML template and CSS that renders a textarea field, however when clicking in the field, the cursor starts from half way down the text area, not from the top left as I would expect. This does not occur in IE, but does in Chrome and FF. I also get a list of previous values entered listed below, suggesting that the textbox styles are being applied. Can anyone advise on which CSS proprties I should be looking to modify? Here is the HTML: <input id="description" class="textarea" type=

SimpleCursorAdapter won't work because of missing _id

自作多情 提交于 2019-12-07 04:11:26
i'm having a problem with a Cursor and a SimpleCursorAdapter. What i want to accomplish: I have a database with 3 fields _id | nickName | somethingelse I want to select all nickNames distinctly and provide them in an AutoCompleteTextView. Problem: When doing the query (see below) i don't select the _id-field. That's why i get an error when trying to create the SimpleCursorAdapter because in the cursor there is no field "_id". But if i select the "_id" in the query, the nickNames in the cursor won't be destinct anymore! Additionally a Cursor is not modifyable to my knowledge or is it? So i

Hide QLineEdit blinking cursor

跟風遠走 提交于 2019-12-07 03:35:46
问题 I am working on QT v5.2 I need to hide the blinking cursor (caret) of QLineEdit permanently. But at the same time, I want the QLineEdit to be editable (so readOnly and/or setting editable false is not an option for me). I am already changing the Background color of the QLineEdit when it is in focus, so I will know which QLineEdit widget is getting edited. For my requirement, cursor (the blinking text cursor) display should not be there. I have tried styleSheets , but I can't get the cursor

jQuery Mouse Flicker in IE

柔情痞子 提交于 2019-12-07 03:23:16
问题 When I execute a jQuery function like .fadeIn, .fadeOut, .slideUp, .slideDown, .toggle, etc. in IE the mouse always flickers and the hourglass quickly flickers in and out of view next to the cursor. I've tried different methods of hiding the mouse entirely while the animation is going on to no avail, plus I don't want that in most cases anyways. Does anyone have another solution to fix this? 回答1: If you are doing animation on anything that has a CSS defined background image, IE will do this.

Populate ListView with an arrayList<String> with data obtained from a cursor

若如初见. 提交于 2019-12-07 03:21:25
Helo i am trying to populate a listView with data stored in a sqLite. After i select a product i want all the reference of that product to go on the same line like i drew in the picture. Can i make the ArrayAdapter put all records in the same xml? My code looks like this: The cursor that returns all records: public Cursor getAllRows() { String where = null; // query the DBAdapter Cursor cursor = db.query(true, TABLE_NAME, ALL_KEYS, where, null, null, null, null, null); if (cursor != null) { cursor.moveToFirst(); } return cursor; } Adding data to arrayList: public ArrayList<String>

WPF Trigger to change Cursor

穿精又带淫゛_ 提交于 2019-12-07 03:07:57
问题 I need to change the cursor of a TreeViewItem in a trigger. This code works for all other properties but not Cursor: <Style.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="QuickPhrases:TreeViewChecker.IsMouseDirectlyOverItem" Value="True"> </Condition> <Condition Property="CanSelect" Value="True"></Condition> </MultiTrigger.Conditions> <Setter Property="BorderThickness" Value="0,0,0,1" /> <Setter Property="BorderBrush" Value="Blue" /> <Setter Property="Cursor" Value=