工具欄控制項繫結下拉式顏色選擇框 文字框及響應事件

2021-05-26 18:31:17 字數 1757 閱讀 6111

using system;

using system.drawing;

using system.collections;

using system.componentmodel;

using system.windows.forms;

using system.reflection;

using devexpress.utils;

using devexpress.xtraeditors;

using devexpress.xtraeditors.controls;

using devexpress.xtraeditors.popup;

using devexpress.xtratab;

using devexpress.xtrabars;

using devexpress.lookandfeel;

namespace devexpress.xtrabars.demos.******pad );

//對三個頁面分別進行初始化

for(int i = 0; i < tabcontrol.tabpages.count; i++)                            

settabpageproperties(i);

tabcontrol.dock = dockstyle.fill;

//將頁面容器新增到container容器中

this.container.controls.addrange(new system.windows.forms.control);

//頁面主題變化事件

userlookandfeel.default.stylechanged += new eventhandler(delegate );

setcontainersize();

}//設定容器大小

void setcontainersize()

//獲取新頁面

private xtratabcontrol createtabcontrol()

private colorlistbox createcolorlistbox()

//頁面初始化

private void settabpageproperties(int pageindex)

control.dock = dockstyle.fill;

control.borderstyle = borderstyles.noborder;

control.lookandfeel.parentlookandfeel = itemfontcolor.manager.getcontroller().lookandfeel;

tabpage.controls.add(control);

}private void onentercolor(object sender, entercoloreventargs e)

private void onentercolor(color clr)

g.dispose();

iml.images.add(im);

itemfontcolor.imageindex = iml.images.count - 1;

}private colorcellscontrol cellscontrol }

private string customcolorsname }

public color resultcolor }

public size calcformsize() }}

MFC工具欄按鈕下拉

1.首先在cmainframe oncreate 函式下新增如下 讓工具欄有下拉能力和向下的箭頭按鈕 讓工具欄具有處理下拉箭頭的能力 dword dwexstyle tbstyle ex drawddarrows m wnd get ctrl sendmessage tb setextendedst...

RCP建立選單欄工具欄(下拉)

如圖 建立並註冊action override protected void makeactions iworkbenchwindow window 建立選單,選單項 override protected void fillmenubar imenumanager menubar override ...

解決工具欄中消失了的dev控制項工具欄

有時候會出現這樣一種情況 上次使用的時候工具欄中dev控制項還很正常的顯示,但是下次開啟vs是時候你會發現工具欄中微軟自帶的控制項還乖乖的待在那裡,dev控制項不知道跑哪調皮去啦。這很鬱悶啊,怎麼辦呢?別急,周文王推崇的八卦演繹,天地萬物,相生相剋,下面就是尋找dev藏身之地的途徑。在開始程式裡找到...