wxgrid freezeto禁用水平滚动条
我在Windows下使用WXWIDGETS 3.1.5,其中我开发了一个i具有的WXGRID,其中包含比显示的列更多的列,因此需要一个水平滚动条。
当我在虚拟表中使用 freezeto 通过wxgridtablebase中出现问题: 如果WXGRID包含的行 均可看到水平和垂直滚动条 , 否则,如果显示所有行,则不会显示垂直滚动条,即使必须启用它,它也将被禁用的水平滚动条。
要证明它可以使用WXWIDGETS提供的示例网格控制WXWIDGETS样品,在 griddemo.cpp中修改BigGridFrame构造函数,例如:
// ============================================================================
// BigGridFrame and BigGridTable: Sample of a non-standard table
// ============================================================================
BigGridFrame::BigGridFrame(long sizeGrid)
: wxFrame(NULL, wxID_ANY, "Plugin Virtual Table")
{
m_grid = new wxGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_table = new BigGridTable(sizeGrid);
// VZ: I don't understand why this slows down the display that much,
// must profile it...
//m_table->SetAttrProvider(new MyGridCellAttrProvider);
m_grid->AssignTable(m_table);
SetClientSize(FromDIP(wxSize(500, 450)));
//if sizeGrid <12 the horizontal scrollbar will not be displayed, if sizeGrid> = 12 the horizontal scrollbar will be displayed
m_grid->FreezeTo(0, 3);
}
如果SizeGrid&lt; 12如果sizeGrid&gt; = 12将显示水平滚动栏
如何修复此错误? 错误
(请参阅在GitHub上报告的 代码,而不是介入wxwidgets库上? 例如,缩小WXGRID的高度以使底部边缘与最后一行重合吗?我该怎么做?
I use wxWidgets 3.1.5 under Windows, in which I have developed a I have a wxGrid that contains more columns than can be displayed, so a horizontal scroll bar is needed.
The problem arises when I use FreezeTo in a virtual table base through wxGridTableBase:
if the wxGrid contains more rows than can be displayed both the horizontal and vertical scroll bars are visible,
otherwise, if all rows are displayed, the vertical scroll bar is not displayed, the horizontal scroll bar it is disabled even though it must be enabled.
To prove it you can use the example provided by wxWidgets Grid control wxWidgets sample, modifying the BigGridFrame constructor in griddemo.cpp like so:
// ============================================================================
// BigGridFrame and BigGridTable: Sample of a non-standard table
// ============================================================================
BigGridFrame::BigGridFrame(long sizeGrid)
: wxFrame(NULL, wxID_ANY, "Plugin Virtual Table")
{
m_grid = new wxGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_table = new BigGridTable(sizeGrid);
// VZ: I don't understand why this slows down the display that much,
// must profile it...
//m_table->SetAttrProvider(new MyGridCellAttrProvider);
m_grid->AssignTable(m_table);
SetClientSize(FromDIP(wxSize(500, 450)));
//if sizeGrid <12 the horizontal scrollbar will not be displayed, if sizeGrid> = 12 the horizontal scrollbar will be displayed
m_grid->FreezeTo(0, 3);
}
If sizeGrid <12 the horizontal scrollbar will not be displayed, if sizeGrid> = 12 the horizontal scrollbar will be displayed
how can i fix this bug?
(See bug reported on github)
Is it possible to solve it with some workaround on my code, instead of intervening on the wxWidgets library ?
For example shrink the height of the wxGrid so that the bottom edge coincides with the last row ? How can I do it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了问题。
通过将发布的补丁应用于:
The problem is solved by applying the patch published to:
patch