DICE PACKS BUNDLE
  1. #1

    Dynamic Number of Checkboxes

    Been trying to puzzle this one out:
    How do you go about making a horizontal series of checkboxes, where the amount rendered is equal to a variable set via a basicnumber element in the same window?

    In other words, if I set the basicnumber field "Invokes" equal to "3," then I should see three checkboxes appear.

    Using plain old CoreRPG as a base, although the extension is meant to "improve" (personal opinion of course) the Fate Core ruleset.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Couple of ways:

    1) Have all of the check boxes defined (assuming you have a definite maximum) and then enable/disable the check boxes through code as the number control is updated. See the setEnabled API command: https://www.fantasygrounds.com/refdo...xcp#setEnabled
    2) Dynamically build the checkboxes using the createControl API when the number control is updated - https://www.fantasygrounds.com/refdo...#createControl

    I’d tend to go with #1 - unless you potentially have lots and lots and lots of check boxes to create.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    Or you can look at the ammocounter template used in 3.5E and 5E rulesets that does something similar.

    Regards,
    JPG

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by Moon Wizard View Post
    Or you can look at the ammocounter template used in 3.5E and 5E rulesets that does something similar.
    Oh yeah, I forgot about that. Good call!
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #5
    Thanks for the fast responses, guys! buttongroup_counter seems perfect for what I'm doing here.

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
  •  
Starfinder Playlist

Log in

Log in