#9165: Allow cells to span rows/columns in wx(Flex)GridSizer
-----------------------------+----------------------
Reporter: randomperson83 | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: future
Component: GUI-all | Version:
Resolution: | Keywords: wxSizer
Blocked By: | Blocking:
Patch: 0 |
-----------------------------+----------------------
Changes (by vadz):
* status: closed => reopened
* resolution: wontfix =>
Old description:
> IMHO, the biggest limitation of the grid sizers is that you cannot
> *easily* span rows and/or columns. wxGBSizer has a limitation that it
> requires the items to be absolutely positioned in the grid, which is not
> always acceptable. Additionally, wxGBSizer does not completely conform to
> the interface defined by wxSizer, and can be difficult to work with if
> you're not familiar with it.
>
> This patch allows you to specify row-span and column-span parameters for
> wxGridSizer derived classes. To my knowledge, this does NOT break
> existing code that uses wxGridSizer derived classes. All elements are
> relatively positioned in regards to their insertion order, just like most
> other wxSizer classes. The rowspan and colspan parameters are meant to
> behave like an HTML table.
>
> wxGridSizer is the only one actually modified with this patch. I will
> most likely do wxFlexGridSizer this weekend, but I would love for
> feedback on these changes before then :)
>
> I modified the Layout sample to demo the capabilities of this patch.
>
> Additionally, there are two things lacking that I haven't actually looked
> into -- if you could give me some guidance then I'll do that too:
>
> - XRC Support
> - Adding documentation (where are the files?)
New description:
IMHO, the biggest limitation of the grid sizers is that you cannot
*easily* span rows and/or columns. wxGBSizer has a limitation that it
requires the items to be absolutely positioned in the grid, which is not
always acceptable. Additionally, wxGBSizer does not completely conform to
the interface defined by wxSizer, and can be difficult to work with if
you're not familiar with it.
This patch allows you to specify row-span and column-span parameters for
wxGridSizer derived classes. To my knowledge, this does NOT break existing
code that uses wxGridSizer derived classes. All elements are relatively
positioned in regards to their insertion order, just like most other
wxSizer classes. The rowspan and colspan parameters are meant to behave
like an HTML table.
wxGridSizer is the only one actually modified with this patch. I will most
likely do wxFlexGridSizer this weekend, but I would love for feedback on
these changes before then :)
I modified the Layout sample to demo the capabilities of this patch.
Additionally, there are two things lacking that I haven't actually looked
into -- if you could give me some guidance then I'll do that too:
- XRC Support
- Adding documentation (where are the files?)
--
Comment:
`wxGridBagSizer` has a completely different and non sizer-like API, so it
would still be pretty nice to have this in `wxFlexGridSizer`.
Unfortunately the fact that this hasn't happened since 10+ years is a
pretty good indication that it's not going to happen at all, but it might
still be worth to keep this open on a chance that somebody finds time to
resurrect this.
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/9165#comment:27>