Closed bdbcat closed 3 years ago
wxFormbuilder did not have any way of delaying creation of the objects when you created the dialog. For android if you want to change the font you have to do it before you create any objects that will use it otherwise if you change the font afterwards the actual font changes but the size of the objects does not. This then makes a mess of the dialog box.
To counter this I helped develop a mod to wxFormbuilder that allows you to select if you want to use 'Create' or not. So you will need to use a version of wxFormBuilder generated after 7th June 2021, https://github.com/wxFormBuilder/wxFormBuilder. I have a ubuntu version of it built if you want to use that, just let me know and I will email you it.
Jon... Thanks for the fill. Makes perfect sense, and only way to do the fonts so that they that will cooperate with the sizers, or vice versa. I tried a build of wxFB from its github HEAD. Crashed immediately. So if you have a Ubuntu PKG ready to go, I would surely appreciate it. Thanks Dave
In OD I use the Forms directory for working with wxFormbuilder and save the files (fbp & Def.h/c), then I copy them to the include and src where they will be found during the build process. I do this so that I don't cause issues if I hit the wrong key at the wrong time in wxFormbuilder.
Jon... If you have a .deb for wxFormBuilder, installable on Ubuntu 18.04, I would really appreciate it.
Multiple build-from-source tries according to wxFormBuilder github repo instructions are failing. Seems to build OK, but crashes immediately on C++ code generation step.
Thanks Dave
I have cobbled together a deb file which I have attached (just remove the zip suffix). It should work, it does for me on a Ubuntu 20.04.
To get the build to work for me I have to remove the media bit from the meson.build file, lines 34, 35 & 36. wxformbuilder-jg-2.9.1.deb.zip
Thanks, I'll check it out.
I presume this can be closed as you managed to work with the supplied version.
Thanks for the pointers. I found that the current wxFB source will build correctly, but the installer assumes a multi-arch environment. A little bit of symlink-ing fixed it up. The result produces the desired output.
Jon... I am working on adapting some of the ocpn_draw_pi dialogs to work acceptably on small Android devices. I do not seems to be able to setup wxFormBuilder to generate the same code as I see in the "Forms" directories.
For example, on ODPropertiesDialogDef.cpp, your github master source starts like:
When I make a small change to the .fbp file, I get this from the wxFB generated code:
Note that your code has a simple CTOR calling a Create() method. My generated code has no such Create() method, but all the work is done in the CTOR. I can see that we are not using the same wxFB version. I am running from the wxFB flatpak Release, from the wxFB github listings. I think there may be some wxFB setting to specify the properties of the generated code. But I cannot find it. Or maybe this is solely due to the wxFB version differences.
Any ideas? Thanks Dave