怎样用ButtonEdit做下拉框
答案:2 悬赏:0 手机版
解决时间 2021-12-31 21:42
- 提问者网友:火车头
- 2021-12-31 04:46
怎样用ButtonEdit做下拉框
最佳答案
- 五星知识达人网友:青灯有味
- 2021-12-31 06:07
参考代码如下:
设置PopupMenu属性:AutoPopup为false,TrackButton为tbLeftButton
自定义方法
void TfrmBrand::BtnPopup(TBitBtn *BitBtnOne,TPopupMenu *PopupMenuOne)
{
TPoint t1,t2;
t1.x=0;
t1.y=BitBtnOne->Height;
t2=BitBtnOne->ClientToScreen(t1);
PopupMenuOne->Popup(t2.x,t2.y);
}
点击bitEdit按钮弹出菜单
void __fastcall TfrmBrand::bitEditClick(TObject *Sender)
{
BtnPopup(bitEdit,PopupMenu1);
}
设置PopupMenu属性:AutoPopup为false,TrackButton为tbLeftButton
自定义方法
void TfrmBrand::BtnPopup(TBitBtn *BitBtnOne,TPopupMenu *PopupMenuOne)
{
TPoint t1,t2;
t1.x=0;
t1.y=BitBtnOne->Height;
t2=BitBtnOne->ClientToScreen(t1);
PopupMenuOne->Popup(t2.x,t2.y);
}
点击bitEdit按钮弹出菜单
void __fastcall TfrmBrand::bitEditClick(TObject *Sender)
{
BtnPopup(bitEdit,PopupMenu1);
}
全部回答
- 1楼网友:一袍清酒付
- 2021-12-31 06:36
我不会~~~但还是要微笑~~~:)
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯