UITextView: changing the color of the cursor

Hi all!
Is it possible to change the color of the cursor in the UITextView?
Thank you,
Luca

I've found out that in this way it works:
[[myUITextField  valueForKey:@"textInputTraits"] setValue:[UIColor redColor] forKey:@"insertionPointColor"];
but I cannot understand whether it is allowed by Apple and if an app using it could be rejected.
Any idea?
Thanks,
Luca

Similar Messages

  • How do i change the cursor on a jtable header when clicked for sorting?

    here is my question, how do i change the cursor on a jtable header when I click the header for sorting?
    I think it is suppose to be in the fragment of code where the header listener is implemented for sorting, but I'm not quite sure what is the exact component that holds everything so that i can change the cursor...
    below is what I've tried, but it doesn't seem to work... thank you
    public void addMouseListenerToHeaderInTable(JTable table) {
    final TableSorter sorter = this;
    final JTable tableView = table;
    tableView.setColumnSelectionAllowed(false);
    MouseAdapter listMouseListener = new
    MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    TableColumnModel columnModel =
    tableView.getColumnModel();
    int viewColumn =
    columnModel.getColumnIndexAtX(e.getX());
    int column =
    tableView.convertColumnIndexToModel
    (viewColumn);
    System.out.println("column = "+column);
    if (e.getClickCount() == 1 && column != -1) {
    System.out.println("Sorting ...");
    Cursor oldCursor =
    tableView.getRootPane().getCursor();
    System.out.println("oldCursor.getType()
    = "+oldCursor.getType());
    if (oldCursor.getType() !=
    Cursor.WAIT_CURSOR){
    JComponent parentPane =
    tableView.getRootPane();
    parentPane.getContentPane().setCursor
    (new Cursor(Cursor.WAIT_CURSOR));
    parentPane.setCursor(new Cursor
    (Cursor.WAIT_CURSOR));
    Cursor newCursor =
    parentPane.getCursor();
    System.out.println("newCursor.getType
    () = "+newCursor.getType());
    int shiftPressed = e.getModifiers(
    &InputEvent.SHIFT_MASK;
    boolean ascending = (shiftPressed == 0);
    //System.out.println("tableView.getRootPane()
    is "+tableView.getRootPane().getRootPane());
    sorter.sortByColumn(column, ascending);
    tableView.getRootPane().setCursor(new Cursor
    (Cursor.DEFAULT_CURSOR));
    //System.out.println("Done sorting");
    JTableHeader th = tableView.getTableHeader();
    th.addMouseListener(listMouseListener);
    }

    Hi,
    Try setting the cursor for the table header.
    table.getHeader().setCursor(Wait_Cursor);
    Bala.

  • Changing the cursor position

    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,
    Amnon

    I 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

  • Changing the Cursor Type

    Good Morning Everyone,
    I am creating a report with a barchart in a column of the report. i have been following these for reference. (mainly the first link)
    http://htmldb.oracle.com/pls/otn/f?p=31517:183:5430906720971021::NO
    http://apex.oracle.com/pls/otn/f?p=220:1:1602821811068326
    http://apex.oracle.com/pls/otn/f?p=220:2:8706839551396459
    I have sucessfully got the "progress bar" in place on my report. Now what i would like to do is change the cursor type, but im struggling.
    This is the basic lay out of the code which i am using,
              '<img src="'
           || '#WORKSPACE_IMAGES#'
           || 'green.gif" height="20" width="'
           || TO_CHAR (random_value)
           || '" '
           || 'title="'
           || TO_CHAR (random_value)
           || '% completed'
           || '" />'
           || '<img src="'
           || '#WORKSPACE_IMAGES#'
           || 'red.gif" height="20" width="'
           || TO_CHAR (100 - random_value)
           || '" '
           || 'title="'
           || TO_CHAR (100 - random_value)
           || '% open'
           || '" />' progress_barPlease could someone help me :)
    Thanks in Advance,
    -N.S.N.O.

    Hey Guys,
    Thanks for your input, i solved my problem :D The style part of the code at the bottom did the trick.
    -N.S.N.O.
    '<img src="'
    || '#WORKSPACE_IMAGES#'
    || 'green.gif" height="20" width="'
    || TO_CHAR (UKXP)
    || '" '
    || 'title="'
    || TO_CHAR (UKXP)
    || '% of tables turned on'
    || '" '
    || 'style="cursor:help";'
    || '" />'
    || '<img src="'
    || '#WORKSPACE_IMAGES#'
    || 'red.gif" height="20" width="'
    || TO_CHAR (100 - UKXP)
    || '" '
    || 'title="'
    || TO_CHAR (100 - UKXP)
    || '% of tables turned off'
    || '" '
    || 'style="cursor:help";'
    || '" />'

  • Changing the cursor to the hourglass. Any ideas?

    I posted this in the Actionscript 3 Forum so I'm sorry about
    the double post.
    I've got a frame in my Flash AIR app that loads some data and
    I'd like to change the cursor to the hourglass in Windows (watch on
    the Mac) while the data loads. Anyone have any ideas? It seems like
    it should be simple, but I just can't seem to find a solution for
    it.

    Yeah, you can't do that. This is a top request of mine, glad
    to see I'm not alone. File an Enhancement Request -- see me
    signature.
    The workaround is to attach a custom graphic within Flash (or
    your HTML app) to the mouse location. The limitation of course is
    that this isn't system level, so you need to rely on custom
    graphics, and the graphic obviously won't be able to go outside the
    Flash/app frame. You can hide the mouse, thus effectively replacing
    the mouse cursor with your custom graphic, but I'd do that with
    caution: poor app performance or hangs will make the user think
    their mouse is hanging, which is a really bad feeling, and there
    are some other situations that can get hairy (mouse stays hidden
    outside of the app frame, sometimes, so cursor has completely
    disappeared!) For an hourglass or similar it makes sense to just
    attach right beside the cursor.
    Marco, the stopwatch you've seen is probably the one used in
    the Flex framework. It uses the custom attached graphic
    workaround.

  • Is there a way to change the cursor hotspot systemwide on Mountain Lion?

    Hello community.
    Is there a way to change the cursor hotspot on Mountain Lion, systemwide?
    Like editing the original cursor file (or downloading one) and replacing the original one?
    Reason: when I enlarge the arrow, the "absoulute" tip (top of the white outline) gets distant from the internal tip (top of the black core), so sometimes the white outline needs to stick out if I want to click the approprate area - because the hotspot is on the internal tip. To me it's counter-intuitive. I would prefer to have the hotspot on the absolute edge of the cursor (tip of the white outline). This is not debatable - this is my private preference, and I've read today that it's not only mine - there is a number of users who want the same.
    I know it's always been like this on Macs, so please avoid questions like "why to you want that", answers like "get used to it" or any kind of hostility, for these are useless. The quiestion is how can I change it, if possible.
    Thanx guys!

    I don't know how you get to the System folder in Mavericks; and even if I found the folder with the alternative cursors in it, I would have no way of switching to any of them.  The designers have obviously not anticipated that anyone would wish to do this.
    The System Preferences has an adjustment under Accessibilty which allows the user to change the size of the cursor, but nothing else.
    So I guess that there is no way to make the change without actually re-engineering the System somehow.
    If someone can find a way, I will be most pleased to be enlightened; only please make the directions explicit.

  • Linking to Images and Changing the Cursor in Dreamweaver CS4

    Suppose I have a link to a jpg that opens up in a new window. Right now, when I hover my mouse over the link, there is no difference in the cursor as it would appear elsewhere on the page (that is, it still appears as a white arrow, instead of a white pointing hand). What do I need to do to change the cursor when it hovers over the link? The link itself works no problem, and linking to other pages on my site produces the pointing hand cursor when I hover it over the link.

    Suppose I have a link to a jpg that opens up in a new window. Right now, when I hover my mouse over the link, there is no difference in the cursor as it would appear elsewhere on the page (that is, it still appears as a white arrow, instead of a white pointing hand). What do I need to do to change the cursor when it hovers over the link? The link itself works no problem, and linking to other pages on my site produces the pointing hand cursor when I hover it over the link.

  • Changing the Cursor Width

    Hai all,
    I have an application in which I am not able to see the Keyboard cursor clearly. Can anyone help me in increasing the Keyboard Cursor width through Oracle Forms 6i.
    Thanks....
    Bye..
    Badari Hareesh.

    Hi,
    as far as I know, this is not possible. On teh Web chances would be to write a PJC that changes the cursor, but this too is more a work around than a feature.
    Frank

  • How do I change the cursor size.

    How do I change the cursor size. I  enlarged  it and now cannot remember where the command is to put it back to normal.

    System Preferences->Accessibility->Display
    Adjust the Cursor Size slider there

  • How can i change the Cursor for the hole frame?

    I think this is quite a simple question:
    I would like to change the cursor for the hole Frame, while the programme is reading data from database.
    but with frame.setCousor(...) i get a compiler-error.
    Thank you

    I think this is quite a simple question:
    I would like to change the cursor for the hole Frame,
    while the programme is reading data from database.
    but with frame.setCousor(...) i get a compiler-error.
    Thank youHello,
    there shouldnt be any compiler-error.
    Post some code and we will help.
    docs:
    /**Sets the cursor image to the specified cursor.
    This cursor image is displayed when the contains method for this component returns true for the current cursor location,
    and this Component is visible, displayable, and enabled.
    Setting the cursor of a Container causes that cursor to be displayed
    within all of the container's subcomponents, except for those that have a non-null cursor.*/
    public void setCursor(Cursor cursor)regards
    tim

  • How do I change the cursor blink rate? Firefox 3.6.10 under Ubuntu.

    How do I change the cursor blink rate? Firefox 3.6.10 under Ubuntu.

    See this old mozillaZine forum thread about this:
    *http://forums.mozillazine.org/viewtopic.php?f=38&t=865895
    ''(please to not post in such old threads)''
    See also:
    * http://kb.mozillazine.org/about:config
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />

  • My CS3/PS has started to change the cursor into a line of three VERY small icons when dragged over a picture or menu. Thus it is VERY difficult for instance to drag a layer in the layer list to the wastebasket - the cursor simply is too big for the waiste

    My CS3/PS has started to change the cursor into a line of three VERY small icons when dragged over a picture or menu. Thus it is VERY difficult for instance to drag a layer in the layer list to the wastebasket - the cursor simply is too big for the waistebasket icon. Even all other exact work is impossible.  Of course I have checked all the cursor presets but nothing seems to help. My OS is Windows7.

    Have you tried resetting Preferences?
    A logical next step would be to reset your Preferences.
    To reset Preferences:
    If Photoshop is already open on your screen, close it (Quit). Then hold down Shift+Ctrl+Alt (Win) / Shift+Command+Option (Mac) on your keyboard and start Photoshop.
    A dialog box will pop up asking if you want to delete the existing Preferences file (the "Settings"). Click Yes in the dialog box. The existing Preferences file will be scrapped and a new one will be created.

  • Why does dragging on a Touch Screen change the cursor into a Hand Tool?

    Why does dragging on a Touch Screen change the cursor into a Hand Tool? This did not happen in CS 5.5 and I could edit on my touch screen monitor. With Photoshop CS 6, as soon as I start to drag, the cursor changes to a hand cursor. I have look at all of the system options and nothing seems to affect it so I have to assume it is something wrong with Photoshop CS 6.

    Try staying with it for a while.  It is much nicer panning that way.  Give it a flick, and touch the screen again when in the right position. 
    I think it came in with CS4 BTW, but it makes a lot of sense keeping it on the Touch version.

  • Change the cursor

    I try to change the cursor on my glassPane like this:
    setCursor(new Cursor(Cursor.WAIT_CURSOR))
    but it doesnt work
    please tell me what is the matter
    (sorry,my english is not very good)

    FYI... The code in the JavaWorld Tip #87 (the article mentioned above) doesn't include the glasspane. In addition, it doesn't work if you have a JOptionPane or a JDialog. These tend to throw back a different kind of event so it never hits the hourglass logic. Otherwise it works pretty good.
    If you decide to use this code, add the following:
    Add a field java.awt.Component gp
    Add the following code to the run() method of the timer:
    if (parent != null && parent.isShowing())
        // do glasspane stuff
        gp = SwingUtilities.getRootPane((Component)parent).getGlassPane();
        parent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                        parent.setVisible(true);
        gp.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                        gp.setVisible(true);
    }Your stopTimer() method should be:
    if (parent == null)
        interrupt();
    else
        parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
        gp.setVisible(false);
        gp.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
        parent = null;
    }          Hope this helps!
    Colleen     

  • Can i change the cursor icon when hover over an active link by another one ?

    Can i change the cursor icon when hover over an active link by another one ?

    i have multiple links,so is there a way to have the custom cusrsor work on all links in a page and not just one?......you can see here i have 3 links..but only the top one changes to the crosshair cursor when rolled over  http://prntscr.com/5oxkj6
    actually it seems its not working on multiple instances of the same button.
    nvm found out why,lol...it was because i ndidnt have an actual link associated with the other instances of the button....all good now:)

Maybe you are looking for

  • Cannot connect SAP Business One with iPad

    Hey all, I am new to SAP Business One. And i am exploring SAP Business One Mobile Applicaiton for iPad. I've tried to follow the step to set up my both SAP Business One and iPad but failed. The message "Connecting to server" keep loading and after fe

  • Different desktop for each space.

    Does anyone know of an application which will display a different desktop picture on each space when using multiple spaces?

  • Standard BAPI for creating groups in SAP

    Hi, I have a requirement to create user groups in SAP executing a BAPI from an external application. As an input parameter the group name and group description will be passed to the BAPI. I am unable to find the standard BAPI for the same. Can anyone

  • Suddenly my speakers are not working

    My speakers were working fine this morning but now they are not.  Any ideas?

  • Htaccess redirect not passing folder names

    Hello everyone. Cant figure this out... purpose is to rewrite all urls without a {www.} to have a {www.} exactly as they are elsewise. RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.deafboyzaudio\.com$ RewriteRule ^(.*)$ http://www.deafboyzaudio.co