DICE PACKS BUNDLE

Thread: ImageControl

  1. #1

    ImageControl

    How do you default an image to be display in it? I can do it in a generic control through icon, but doesn't work for image control.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    You need to source the imagecontrol on an <image> record in the campaign database (or a module). Try using Interface.openWindow("imagewindow", <the DB reference to the image to display>); in a CoreRPG based ruleset. Info on Interface.openWindow here: https://www.fantasygrounds.com/refdo...xcp#openWindow

    This will give you an idea of the format of the DB source to use - for example it might be image.id-00001 for the first image record in your campaign database.

    You have to use database image references from the campaign database or a loaded module, you can't directly specify an image file.
    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
    What I am trying to do is have an image that is part of the extension that allows the player to drop tokens on. I have tried using a generic control and placing the image control over it, but the token placement to the image is not correct when other players are viewing it. Any ideas what i can do instead?

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    I'd suggest looking at the order tab in the party sheet (CoreRPG) - this is a blank image that allows the players to arrange tokens in the marching order, but the GM has to put the tokens on there. I think this will be a good start to get you going...
    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
    I have the image control working, I want a jpg of terrain showing in the background. Can I set a background image to the image control?

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by kalannar View Post
    I have the image control working, I want a jpg of terrain showing in the background. Can I set a background image to the image control?
    You can't do this programatically. As I mentioned in post #2 actual image files are stored in the campaign database or a module - they aren't stored in the filesystem, a ruleset or an extension. Thus you can't create a default picture within an image control that would be 100% fool-proof. You could make one in tandem with a module - and access it by <image DB ref>@<module name> but this would rely on that specific module being installed and manually activated by the GM - definitely not fool-proof! Although you could use the Module.activate method to activate the module if it was installed: https://www.fantasygrounds.com/refdo...e.xcp#activate
    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!

  7. #7
    Ok got it, was hoping there was a way to set the image based of the window the image control inherits. I will just go back to overlaying the image control over a generic control with an image selected. Thank you Trenloe for your help.

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 Product Walkthrough Playlist

Log in

Log in