找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?在线3D打印服务,一键上传,自动报价 
查看: 12497|回复: 0
打印 上一主题 下一主题

[求助] 关于CAA开发Dialog布局的问题?

[复制链接]
跳转到指定楼层
1
发表于 2014-10-26 17:16:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
本帖最后由 chkang 于 2014-10-26 17:17 编辑

小弟新手,做了一个dialog combo的例子,实现的功能为:通过选择不同的combo选项,实现显示不同的展示框。结果不知哪里没有设置好,成了下面的模样,两个frame重合了,请高手指点:

实现的代码如下:
_PlaneTypeFrame = new CATDlgFrame(this, "PlaneTypeFrame", CATDlgGridLayout);
SetHorizontalAttachment(0,CATDlgTopOrLeft,_PlaneTypeFrame,NULL);
_PlaneTypeLabel = new CATDlgLabel(_PlaneTypeFrame, "PlaneTypeLabel");
_PlaneTypeLabel -> SetGridConstraints(0, 0, 1, 1, CATGRID_4SIDES);
_PlaneTypeCombo = new CATDlgCombo(_PlaneTypeFrame, "PlaneTypeCombo", CATDlgCmbDropDown);
_PlaneTypeCombo -> SetGridConstraints(0, 1, 1, 1, CATGRID_4SIDES);
CATUnicodeString LineNLS ;
LineNLS = CATMsgCatalog::BuildMessage("TrainningCreatePlaneDlg",
                                                                          "PlaneTypeCombo.ThreePoint",NULL,0,"Through three point");   
_PlaneTypeCombo->SetLine(LineNLS);
LineNLS = CATMsgCatalog::BuildMessage("TrainningCreatePlaneDlg",
                                                                  "PlaneTypeCombo.PointAndLine",NULL,0,"Through point and line");
_PlaneTypeCombo->SetLine(LineNLS);
LineNLS = CATMsgCatalog::BuildMessage("TrainningCreatePlaneDlg",
                                                                          "PlaneTypeCombo.TwoLine",NULL,0,"Through two line");
_PlaneTypeCombo->SetLine(LineNLS);


_PlaneByThreePoint = new CATDlgFrame(this, "PlaneByThreePoint", CATDlgGridLayout);
_PlaneByThreePoint->SetVisibility(CATDlgHide);
_pListFrame[ThreePoint] = _PlaneByThreePoint ;
_FirstPointLabel = new CATDlgLabel(_PlaneByThreePoint, "FirstPointLabel");
_FirstPointLabel -> SetGridConstraints(0, 0, 1, 1, CATGRID_4SIDES);
_FirstPointEditor = new CATDlgEditor(_PlaneByThreePoint, "FirstPointEditor", CATDlgEdtReadOnly);
_FirstPointEditor -> SetGridConstraints(0, 1, 1, 1, CATGRID_4SIDES);
_SecondPointLabel = new CATDlgLabel(_PlaneByThreePoint, "SecondPointLabel");
_SecondPointLabel -> SetGridConstraints(1, 0, 1, 1, CATGRID_4SIDES);
_SecongPointEditor = new CATDlgEditor(_PlaneByThreePoint, "SecongPointEditor", CATDlgEdtReadOnly);
_SecongPointEditor -> SetGridConstraints(1, 1, 1, 1, CATGRID_4SIDES);
_ThirdPointLabel = new CATDlgLabel(_PlaneByThreePoint, "ThirdPointLabel");
_ThirdPointLabel -> SetGridConstraints(2, 0, 1, 1, CATGRID_4SIDES);
_ThirdPointEditor = new CATDlgEditor(_PlaneByThreePoint, "ThirdPointEditor", CATDlgEdtReadOnly);
_ThirdPointEditor -> SetGridConstraints(2, 1, 1, 1, CATGRID_4SIDES);


_PointAndLineFrame = new CATDlgFrame(this, "PointAndLineFrame", CATDlgGridLayout);
_PointAndLineFrame->SetVisibility(CATDlgHide);
_pListFrame[PointAndLine] = _PointAndLineFrame ;
_OnePointLabel = new CATDlgLabel(_PointAndLineFrame, "OnePointLabel");
_OnePointLabel -> SetGridConstraints(0, 0, 1, 1, CATGRID_4SIDES);
_OneLineLabel = new CATDlgLabel(_PointAndLineFrame, "OneLineLabel");
_OneLineLabel -> SetGridConstraints(1, 0, 1, 1, CATGRID_4SIDES);
_Editor015 = new CATDlgEditor(_PointAndLineFrame, "Editor015", CATDlgEdtReadOnly);
_Editor015 -> SetGridConstraints(0, 1, 1, 1, CATGRID_4SIDES);
_Editor016 = new CATDlgEditor(_PointAndLineFrame, "Editor016", CATDlgEdtReadOnly);
_Editor016 -> SetGridConstraints(1, 1, 1, 1, CATGRID_4SIDES);



_TwoLineFrame = new CATDlgFrame(this, "TwoLineFrame", CATDlgGridLayout);
_TwoLineFrame->SetVisibility(CATDlgHide);
_pListFrame[TwoLine] = _TwoLineFrame ;
_FirstLineLabel = new CATDlgLabel(_TwoLineFrame, "FirstLineLabel");
_FirstLineLabel -> SetGridConstraints(0, 0, 1, 1, CATGRID_4SIDES);
_SecondLineLabel = new CATDlgLabel(_TwoLineFrame, "SecondLineLabel");
_SecondLineLabel -> SetGridConstraints(1, 0, 1, 1, CATGRID_4SIDES);
_FirstLineEditor = new CATDlgEditor(_TwoLineFrame, "FirstLineEditor", CATDlgEdtReadOnly);
_FirstLineEditor -> SetGridConstraints(0, 1, 1, 1, CATGRID_4SIDES);
_SecondLineEditor = new CATDlgEditor(_TwoLineFrame, "SecondLineEditor", CATDlgEdtReadOnly);
_SecondLineEditor -> SetGridConstraints(1, 1, 1, 1, CATGRID_4SIDES);

_CurrentSelection = ThreePoint;
_PlaneTypeCombo->SetSelect(_CurrentSelection,0);
SetHorizontalAttachment(5,CATDlgTopOrLeft,_pListFrame[_CurrentSelection],NULL);
_pListFrame[_CurrentSelection]->SetVisibility(CATDlgShow);
AddAnalyseNotificationCB (_PlaneTypeCombo,
                                                  _PlaneTypeCombo->GetComboSelectNotification(),
                                                  (CATCommandMethod)&TrainningCreatePlaneDlg::OnComboSelectNotification,
                                                  NULL);

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2024-4-24 05:09 , Processed in 0.023378 second(s), 14 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表