5E Product Walkthrough Playlist
Page 3 of 3 First 123

Thread: Context Menus

  1. #21

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    I just checked this on the inventory tab to make sure this wasn't an isolated incident. I added a double click to set focus to all of the coin fields to advance to the next one. The same thing happens. It for a split-second highlights the next coin field and then immediately returns. So this appears to be something fundamental with either the cursor hovering an element, or the numberfield itself capturing its own focus.
    Attached Files Attached Files

  2. #22

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    GOT IT! It's something in the base level onClickRelease() event. I did an overwrite on numberboxes and it fixed the issue as shown below. So, there's something in the base class' onClickRelease event that's reclaiming Focus. I don't see it in the rulesets, so I'm guessing this is base level.

    function onClickRelease(button,x,y)
    return true;
    end

  3. #23
    I haven’t had a chance to load the files yet; but are you also capturing the onClickRelease event and returning true. Without having looked at the specific code yet; the FG client code could be setting focus on click release as well.

    Regards,
    JPG

  4. #24

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    This is causing new issues now where onclick apparently doesn't capture focus. Working on a workaround for this now.

  5. #25
    Whenever I capture an onClickDown event, I always add an onClickRelease event as well. This allows me full control over what happens when someone clicks on a field, including whether to setFocus or not.

    JPG

  6. #26

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    That's what I've done. I've removed the set focus from the OnClickRelease and added to the onClickDown. Seems to be working now as expected. Now going to template this for the 4 places I want to use it.

    Just different from how I'm used to WinForms and XAML working with controls.

  7. #27

    Join Date
    Jan 2015
    Location
    Grand Rapids, MI
    Posts
    136
    Just wanted to drop in and say thanks for all the help. I got this extension working how I wanted. You can see the changed in the video in this post. I'm quite proud of the edit fields capability I added to the character sheet and combat trackers.

    https://www.fantasygrounds.com/forum...l=1#post392243

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Character Create Playlist

Log in

Log in