wx
来源:互联网 发布:最好看的人工智能电影 编辑:程序博客网 时间:2024/06/11 19:48
[closed] wx AttachUnknownControl work with one customized grid control, cannot show h+v scrollbars on Linux
Yesterday, I met this problem. See below code example:
pGrid = new SortTable(m_clipListPnl, ID_CLIP_LIST_GRID, ARRAYLEN($oneStrArray), $oneStrArray);wxXmlResource::Get()->AttachUnknownControl($CTRLID, pGrid);
SortTable is our customized grid table, derived from wxGrid. When show this grid, we cannot see its h/v scroll bars on Linux, see below screenshot:
How to solve this problem?
asked Feb 27 '13 at 17:12
Zero
4.4k●19●109
closed Apr 23 '13 at 17:36
The question has been closed for the following reason "The question is answered, right answer was accepted" by Zero Apr 23 '13 at 17:36
Currently solution is that don't create any row/col including labels, before AttachUknownControl function call. Refer to CL-193574 in PLT-20261 for this solution.
// create empty gridm_flowListGrid = new SortTable(m_flowListPnl, ID_FLOW_LIST_GRID, 0, NULL);wxXmlResource::Get()->AttachUnknownControl(XRC_STR[ID_FLOW_LIST_GRID], m_flowListGrid, m_flowListPnl);::AppendGridColumns(m_flowListGrid, flow_grid_col_labels, ARRAY_LEN(flow_grid_col_labels));
answered Mar 01 '13 at 14:18
Zero
4.4k●19●109
I find in some case, using xrc AttachUnnownControl and display ctrl directrly are different in ui behivior. but I don't know the reason.
AttachUnknownControl has different implementation on both platforms, but mainly do reparent task. Reparent current control window as one child of that "unknown" window defined in xrc file, so reparent window procedure will trigger AddChild function call and then cause window resize/layout. Mostly windows platform works correctly, gtk platform has unexpected display issues.
@Zero, yes, I met the problem in using a CollapsablePanel ctrl in our project, when use sizeer and display directly, it works ok and can collspse,but in xrc and attach unknown ctrl, it can't collspse. I guess xrc reparent current control and put this ctrl in sizer directly is different
Please record this in wx pitfall page
- \wx
- wx
- wx
- wx
- wx
- wx
- wxPython.wx
- wx.Dialog
- wx.ID_**
- 编译WX
- wx.ScrolledWindow
- wx.Frame
- wx计算器
- wx记事本
- wx.menubar
- wx-qa
- WX配置
- wx.canvasToTempFilePath
- POJ 1328 区间选点问题
- "fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt"解决方案
- wxwidget
- 对比AppScan Source和Fortify扫描AltoroJ的结果
- hadoop和hbase分布式安装详细过程
- wx
- SQLServer 2008 (三)
- ubuntu启动时开启或停止服务
- 在SharePoint中处理匿名访问(Anonymous access)
- MAC 命令行大全
- adapter,gateway操作疑问
- 移植libmxml到(arm-linux)
- Android 中各种XML文件的作用
- Axure绘制原型设计
SortTable override some methods affecting the behaviors of ScrollWindow?
@yahuang, if not via xrc solution to AttachUnknownControl, SortTable behaves correctly, like we manually write ui code.