CopperSpice API  1.7.4
Resources in Designer

Designer uses the CopperSpice Resource System. Resources are files like images and icons which can be shown on any form in a tool bar, tool button, in place of text on a push button, and various other controls. A resource file has an extension of .qrc and is structured using the XML format.

The Resource Editor is used to create a new qrc file or edit an existing one. A separate resource file can be created for each form or the same resource file can be used on multiple forms.

Creating a Resource File

To specify a resource file open the resource editor by selecting View from the main menu and then enable the Resource Editor. Click the "pencil icon" to create a new resource file or edit an existing resource file. To reload resources click on the "reload icon".

Use the first icon on the lower left to create a new resource file or the middle icon to open an existing resource file. Once a resource file has been loaded, images can be added or removed using the three icons on the right side.

Using Resources on a Form

When changing a property which accepts an image, there are multiple ways to specify which image should be used. Clicking the down arrow next to the "..." button will show a drop down list. If you have created a qrc file you can open the resource selector by clicking Choose Resource....

If you do not have a qrc resource file or simply want to select the image from disk, click on Choose File... and then the file dialog to locate an image.