zoukankan      html  css  js  c++  java
  • Dev控件 galleryControl

    发现一个规律,不会的控件先拖到界面上,右上角需要add 的就对应add一个。然后就是找属性和集合手动添加几个。

    然后把XXXForm.Designer.cs 里面的代码提取到逻辑代码中,就把常量换成变量就好了。

    以galleryControl 为例

    //DevExpress.XtraBars.Ribbon.GalleryItem item = new DevExpress.XtraBars.Ribbon.GalleryItem(global::WFInfoSetControlModule.Properties.Resources.u1136, "111asda", "dsafasdfsad");
    //item.ImageIndex = 0; item.HoverImageIndex = 0;
    //this.galleryControl1.Gallery.Groups[0].Items.Add(item);
    //DevExpress.XtraBars.Ribbon.GalleryItem itema = new DevExpress.XtraBars.Ribbon.GalleryItem(global::WFInfoSetControlModule.Properties.Resources.u1136, "111sfsafasda", "dsafassadfsadfsad");
    //itema.ImageIndex = 1; itema.HoverImageIndex = 1;
    //this.galleryControl1.Gallery.Groups[0].Items.Add(itema);
    //DevExpress.XtraBars.Ribbon.GalleryItem itemaa = new DevExpress.XtraBars.Ribbon.GalleryItem(global::WFInfoSetControlModule.Properties.Resources.u1136, "111sadfsadfasda", "dsafasdfsad");
    //itemaa.ImageIndex = 2; itemaa.HoverImageIndex = 2;
    //this.galleryControl1.Gallery.Groups[0].Items.Add(itemaa);
    DevExpress.XtraBars.Ribbon.GalleryItemGroup galleryItemGroup1 = new DevExpress.XtraBars.Ribbon.GalleryItemGroup();

    DevExpress.XtraBars.Ribbon.GalleryItem galleryItem1 = new DevExpress.XtraBars.Ribbon.GalleryItem();
    DevExpress.XtraBars.Ribbon.GalleryItem galleryItem2 = new DevExpress.XtraBars.Ribbon.GalleryItem();
    galleryItem1.Caption = "Item1";
    galleryItem1.Image = global::WFInfoSetControlModule.Properties.Resources.u1138;
    galleryItem2.Caption = "Item2";
    galleryItem2.Image = global::WFInfoSetControlModule.Properties.Resources.u1136;
    galleryItemGroup1.Items.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItem[]
    {
    galleryItem1,
    galleryItem2});
    galleryItemGroup1.Caption = "Group1";

    this.galleryControl1.Gallery.Groups.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItemGroup[] {
    galleryItemGroup1});

    上面注释的是自己猜的。始终搞不定。最后用了上面的方法。对您有用的点击下面该点的给个赞吧。

  • 相关阅读:
    对各种语言的运行时系统的思考
    在Ipython console运行shell命令
    浪潮之巅第四版
    Python实现BSC信道
    一款超赞的英文翻译工具-CopyTranslator
    Python处理alist文件——稀疏矩阵的读取和存储
    Numpy/Scipy 中与Matlab中的sparse函数等效的操作——Python处理稀疏矩阵
    简单优先分析法
    蓝桥杯 矩阵乘法
    蓝桥杯 Island Hopping Java代码
  • 原文地址:https://www.cnblogs.com/wwwzzg168/p/3808148.html
Copyright © 2011-2022 走看看