Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature growables #513

merged 3 commits into from Apr 17, 2019


None yet
1 participant
Copy link

commented Mar 29, 2019

While fixing the latest sizer related problem i discovered it's still not possible to specify the proportion for growable columns or rows. Turned out it was rather difficult to implement this. The basic problems are that there is no datatype in wxFB for this and limitations of the code template language.

This left me two choices:

  1. Create new datatypes
  2. Add the Proportions to a second parameter

I quickly dropped the second one because you cannot validate data across two parameters and the code templates needed to be changed (possible with a new language element) and the XRC code too.

So i ended up creating new datatypes that are based on the present intlist types. Because these types do not convert the data between the "stages" XRC<->storage<->display, the new ones don't either because i reuse the code path, so you have to use the XRC format for display.

I am not that happy about this, because these new datatypes sound quite generic but have quite a special property: drop the second parameter if it's zero. It just didn't look good with these appended :0 (you can blame me for that, it was actually me who added this feature to the XRC system 馃槃). Second issue is that the code generator turns each pair into one value separated with ,, because this is a separator in every supported language this ends up as two values. This is necessary because the #foreach macro can process only one child value and is used when processing these lists. Well, at least that is somehow reflected by the name of the datatype.

I would merge it like this because i don't see another sensible way to implement this, but i want to check first if someone else has strong objections against this.

sodevel added some commits Mar 23, 2019

These will be used to specify the proportion of growables of sizer items and are optimized for that purpose, which means they will drop the second
element on display if it is zero.

The implementation is based on the IntList type which got extended to support pair elements.
Extend Object interface of plugin interface to include a dedicated me鈥
鈥hod to easily return the datatypes PT_INTPAIRLIST and PT_UINTPAIRLIST

@sodevel sodevel merged commit 0e591aa into wxFormBuilder:master Apr 17, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/drone/pr Build is passing
continuous-integration/travis-ci/pr The Travis CI build passed

@sodevel sodevel deleted the sodevel:feature_growables branch Apr 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.