WebToolBarButton Cursor Change

  1. ‹ Older
  2. 6 weeks ago

    Michel B

    Sep 14 Pre-Release Testers, Xojo Pro RubberViews.com

    No, Micheal.

    Read the page I linked to about CSS cursors for available values.

    ExecuteJavaScript("document.getElementById('" + me.ControlID + "_AddPatientButton').style.cursor = 'pointer';")

    If you have trouble dealing with JavaScript/css, stick to Xojo webstyles. They shield you from complexity.

  3. 5 weeks ago

    I mean to try to learn some things about Javascript.
    I visited the cite mentioned but I have tried different permutations but nothing happened
    eg.
    ExecuteJavaScript("document.getElementById('" + me.ControlID + "_Button1').style.cursor = '{cursor: e-resize}';")

    but no luck. So, I would be gratefull if you modified my example to get a grasp how things works in Javascript and Xojo

  4. Michel B

    Sep 15 Pre-Release Testers, Xojo Pro RubberViews.com
    Edited 5 weeks ago

    What you got to understand is that when you use ExecuteJavaScript you no longer are using Xojo, but pure JavaScript.

    At the site I linked to, you have a list of available cursors.

    https://www.w3schools.com/cssref/pr_class_cursor.asp

    Example:

    .pointer {cursor: pointer;}

    This is the cursor you need. In CSS syntax, cursor: pointer; means cursor = pointer. Pointer being the finger pointer.

    You may enjoy this page, where you can see what each cursor does:
    https://www.w3schools.com/cssref/tryit.asp?filename=trycss_cursor

    Here is more about the syntax:
    https://www.w3schools.com/jsref/prop_style_cursor.asp

    The site w3Schools.com is a superb resource to learn HTML/CSS/JavaScript.

    Finally:

     ExecuteJavaScript("document.getElementById('" + me.ControlID + "_Button1').style.cursor = 'pointer';")

    Which I keep posting.

  5. 4 weeks ago

    I see! Thanks a lot for the detailed explanation :-)

or Sign Up to reply!