wx

来源:互联网 发布:最好看的人工智能电影 编辑:程序博客网 时间:2024/06/11 19:48

[closed] wx AttachUnknownControl work with one customized grid control, cannot show h+v scrollbars on Linux

2

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:

alt text

How to solve this problem?

wxwidgets
report

asked Feb 27 '13 at 17:12

Zero's gravatar image

Zero
4.4k19109

closed Apr 23 '13 at 17:36

SortTable override some methods affecting the behaviors of ScrollWindow?

(Feb 28 '13 at 09:54)yahuang

@yahuang, if not via xrc solution to AttachUnknownControl, SortTable behaves correctly, like we manually write ui code.

(Feb 28 '13 at 13:12)Zero
add new comment

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


One Answer:
oldestnewestmost voted
4

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));
link|award points|report

answered Mar 01 '13 at 14:18

Zero's gravatar image

Zero
4.4k19109

I find in some case, using xrc AttachUnnownControl and display ctrl directrly are different in ui behivior. but I don't know the reason.

(Mar 01 '13 at 14:52)tanli
1

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.

(Mar 01 '13 at 14:58)Zero

@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

(Mar 01 '13 at 15:13)tanli

Please record this in wx pitfall page

(Mar 26 '13 at 10:53)Yun Yuan
add new comment
0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 大四体育挂科怎么办 大四体育没过怎么办 大二体育挂了怎么办 大学体育刚刚及格怎么办 大学体育课没选怎么办 大专挂科拿不到毕业证怎么办 大学专业课挂科怎么办 专科重修没过怎么办 大学毕业证没领怎么办 大一数学挂科怎么办 大学体育课挂了怎么办 大一考试挂科怎么办 一年级孩子考试不及格怎么办 孩子一年级数学不及格怎么办 一年级孩子考试紧张怎么办 健身动作不标准怎么办 足球赛踢平了怎么办 踢球指甲淤血了怎么办 初中一年级成绩差怎么办 着火了怎么办小班教案 小孩爱玩游戏怎么办 幼儿上学哭闹老师怎么办 孩子不喜欢上幼儿园怎么办 幼儿喜欢脱鞋怎么办 幼儿在教室乱跑怎么办 转学学校不接收怎么办 留守儿童成绩差怎么办 感冒鼻孑堵咳嗽哮喘怎么办 二年级数学报怎么办 不敢翻前滚翻怎么办啊 大学全挂了怎么办 幼儿园热了怎么办教案 幼儿园小班热了怎么办教案 高考艺术生色弱怎么办 雾眉后出现白棱怎么办 lol皮肤重复了怎么办 怕篮球砸到怎么办 前滚翻向一侧偏怎么办 大腿肌肉比较发达怎么办 学计算机老了怎么办 新生儿头尖尖的怎么办