Plugin's icon?

How to add plugin control’s icon?

The documentations seem contradict each other. In PluginPackaging documentation,

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.

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

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?

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.

[quote=367247:@Björn Eirí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.[/quote]
Yes, I’m using your PictureButton plugin images for testing only. Do you mean reference numbers are toolbarPICT and toolbarDownPICT?

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)
};

Thank you very much. It’s working now.