Plugin's icon?

  1. 2 years ago

    How to add plugin control's icon?
    -image-

    The documentations seem contradict each other. In PluginPackaging documentation,

    Note that the picture filename must match the id number (i.e. the toolbarPICT field of the REALcontrol struct) that you defined for your control.

    Where in Plugin SDK documentation,

    toolbarPICT: this field is deprecated and should not be used in new plugins. Instead, you should specify the icon in the RBX plugin format manually. This field should be zero.
    toolbarDownPICT: this field is deprecated and should not be used in new plugins. This field should be zero.

    Also, I've tried using filename mentioned in PluginPackaging with no luck.

    This here is the struct for the PictureButton:

    The two 128 numbers there are the reference to the images

    REALcontrol PictureButton =
    {
    kCurrentREALControlVersion, "PictureButton",
    sizeof(PictureButtonData),
    REALcontrolIsHIViewCompatible | REALenabledControl,
    128,
    128,
    60,22,
    PictureButtonProperties, sizeof(PictureButtonProperties) / sizeof(REALproperty),
    PictureButtonMethods,1,
    PictureButtonEvents, 10,
    &PictureButtonBehaviour,
    0,
    PictureButtonEventInstances,
    sizeof(PictureButtonEventInstances) / sizeof(REALeventInstance)
    };

  2. Björn E

    3 Jan 2018 Pre-Release Testers, Xojo Pro Iceland

    Grab plugin control from me at www.einhugur.com (for example DateControl), then rename the plugin file to zip, and then Unzip it. You can then see the file structure for the Icon.

    Hope this helps

    Björn

  3. Thank you.

    It's really strange. Your plugin works, but not mine. Even after using your IDE Resources directory , still doesn't work.

    I only provide 1 so file, is that okay?

  4. Björn E

    3 Jan 2018 Pre-Release Testers, Xojo Pro Iceland

    You need to provide the TIFF files, both the large one and the small ones, and both the TIFF files contain 2 streams in them 72 DPI and 144 DPI

    I am not at home yet to check in the code but I think in the code I just have 128 as reference to the image. I can check later on when I get home if you have not gotten it to work by then.

    So if I am correct then if testing with my images then all you should need is to have your control structure use this reference number.

  5. @Björn Eiacute;ksson So if I am correct then if testing with my images then all you should need is to have your control structure use this reference number.

    Yes, I'm using your PictureButton plugin images for testing only. Do you mean reference numbers are toolbarPICT and toolbarDownPICT?

  6. Björn E

    3 Jan 2018 Pre-Release Testers, Xojo Pro Answer Iceland

    This here is the struct for the PictureButton:

    The two 128 numbers there are the reference to the images

    REALcontrol PictureButton =
    {
    kCurrentREALControlVersion, "PictureButton",
    sizeof(PictureButtonData),
    REALcontrolIsHIViewCompatible | REALenabledControl,
    128,
    128,
    60,22,
    PictureButtonProperties, sizeof(PictureButtonProperties) / sizeof(REALproperty),
    PictureButtonMethods,1,
    PictureButtonEvents, 10,
    &PictureButtonBehaviour,
    0,
    PictureButtonEventInstances,
    sizeof(PictureButtonEventInstances) / sizeof(REALeventInstance)
    };

  7. Thank you very much. It's working now.

or Sign Up to reply!