wxFormBuilder / wxFormBuilder

A wxWidgets GUI Builder
https://github.com/wxFormBuilder/wxFormBuilder/releases
GNU General Public License v2.0
2.09k stars 378 forks source link

Resource files #60

Open wxfbint opened 9 years ago

wxfbint commented 9 years ago

Is possible to add the resource files features, to manage icons, images and other?

Reported by: mrdebug

Jalkhov commented 4 months ago

Beyond answering the question of this issue, I take advantage of the fact that it is still open to bring up this option:

imagen

I'm not sure how it works. Where should the .rc file be positioned? What structure should it have? I imagine this is typical of wxPython but I can't find anything regarding these options.

@sodevel @jhasse

sodevel commented 4 months ago

Resource files get compiled and linked into windows executables, i don't know how/if this can be used by wxPython because Python files are usually interpreted script files (which i think can be packed into executables with certain tools, but i basically know nothing about Python). It doesn't matter where the .rc file is placed, anywhere where your buildsystem will pick it up to compile and link it, this is beyond the scope of wxFB. All you setup in wxFB is the name of the resource it should use. I also don't know the syntax of .rc files in detail, the Windows API documentation contains that information.

As an example, take the wxFB resource file https://github.com/wxFormBuilder/wxFormBuilder/blob/9b91cdd37961d84b41e65823f0903df847fc1bef/src/wxFormBuilder.rc#L28

It contains one icon with the name A, that would be what you use as resource_name in the image in your post.