1. #1
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    744
    Vote Rating
    27
    LesJ will become famous soon enough LesJ will become famous soon enough

      0  

    Default text widget - how do I set cursor?

    text widget - how do I set cursor?


    I'm trying to set the cursor (to pointer), but cursor is not changed over the text.

    How do I change the cursor over the text?

    Code:
    Ext.create('Ext.draw.Text', {
        renderTo: Ext.getBody(),
        width: 200,
        height: 350,
        autoSize: false,
        viewBox: false,
        padding: 20,
        degrees: 315,
        text: 'Hi there!',
        style: {
            cursor: 'pointer'
        },
        textStyle: {          
            padding: 20,
            fill: '#000',
            font: '18px Arial',
            y: 50
        }
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,684
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    I'm not 100% you can. I added the cursor: pointer to the <text> field but that didn't do anything. Tried to put it on the <svg> and still no go.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,083
    Vote Rating
    112
    skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold

      0  

    Default


    Did you have this working in 4.0.7?

  4. #4
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    744
    Vote Rating
    27
    LesJ will become famous soon enough LesJ will become famous soon enough

      0  

    Default


    Quote Originally Posted by skirtle View Post
    Did you have this working in 4.0.7?
    Ext.draw.Text is a new component and not available in 4.0.7.

  5. #5
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,083
    Vote Rating
    112
    skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold skirtle is a splendid one to behold

      0  

    Default


    Ah, sorry, I missed that.

  6. #6
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    744
    Vote Rating
    27
    LesJ will become famous soon enough LesJ will become famous soon enough

      0  

    Default


    I solved this problem by adding a zero opacity 'rect' sprite on top of the text sprite (higher z-index)... works in SVG and VML.