当前位置: 首页>>代码示例>>C#>>正文


C# ComboBoxEntry.PackStart方法代码示例

本文整理汇总了C#中ComboBoxEntry.PackStart方法的典型用法代码示例。如果您正苦于以下问题:C# ComboBoxEntry.PackStart方法的具体用法?C# ComboBoxEntry.PackStart怎么用?C# ComboBoxEntry.PackStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ComboBoxEntry的用法示例。


在下文中一共展示了ComboBoxEntry.PackStart方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NewProjectWizzard_New


//.........这里部分代码省略.........
            CellRendererText rendererOrientation = new CellRendererText();

            selectedTypPrj = new TreePath("0");
            ivSelectTyp.SelectPath(selectedTypPrj);

            ivSelectOrientation.Model = storeOrientation;
            ivSelectOrientation.SelectionMode = SelectionMode.Single;
            ivSelectOrientation.Orientation = Orientation.Horizontal;

            ivSelectOrientation.PackEnd(rendererOrientation,false);
            ivSelectOrientation.SetCellDataFunc(rendererOrientation, new Gtk.CellLayoutDataFunc(RenderOrientationProject));
            ivSelectOrientation.PixbufColumn = COL_PIXBUF;
            ivSelectOrientation.TooltipColumn = COL_DISPLAY_TEXT;

            foreach(SettingValue ds in MainClass.Settings.DisplayOrientations){
                storeOrientation.AppendValues (ds.Display,ds.Display,null,ds.Value);
            }
            ivSelectOrientation.SelectPath(new TreePath("0"));
            storeWorkspace = new ListStore(typeof(string), typeof(string), typeof(int));
            cbeWorkspace = new ComboBoxEntry();
            cbeWorkspace.Model = storeWorkspace;
            cbeWorkspace.TextColumn = 0;
            cbeWorkspace.Changed+= OnCbeWorkspaceChanged;

            this.feLocation = new FileEntry();
            this.table3.Attach (this.feLocation,1,2,2,3);
            Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table3 [this.feLocation]));
            w9.XOptions = ((Gtk.AttachOptions)(4));
            w9.YOptions = ((Gtk.AttachOptions)(4));

            table3.Attach(cbeWorkspace,1,2,1,2,AttachOptions.Fill|AttachOptions.Expand,AttachOptions.Fill,0,0);

            CellRendererText rendererWorkspace = new CellRendererText();
            cbeWorkspace.PackStart(rendererWorkspace, true);
            cbeWorkspace.SetCellDataFunc(rendererWorkspace, new Gtk.CellLayoutDataFunc(RenderWorkspacePath));
            cbeWorkspace.WidthRequest = 125;

            cbeWorkspace.SetCellDataFunc(cbeWorkspace.Cells[0], new Gtk.CellLayoutDataFunc(RenderWorkspaceName));

            string currentWorkspace ="";
            if((MainClass.Workspace!= null) && !string.IsNullOrEmpty(MainClass.Workspace.FilePath))
            {
                string name = System.IO.Path.GetFileNameWithoutExtension(MainClass.Workspace.FilePath);
                storeWorkspace.AppendValues (name,MainClass.Workspace.FilePath,1);
                currentWorkspace = MainClass.Workspace.FilePath;
            }
            IList<RecentFile> lRecentProjects = MainClass.Settings.RecentFiles.GetWorkspace();

            foreach(RecentFile rf in lRecentProjects){

                if(rf.FileName == currentWorkspace) continue;
                if(File.Exists(rf.FileName)){
                    string name = System.IO.Path.GetFileNameWithoutExtension(rf.FileName);
                    storeWorkspace.AppendValues(name,rf.FileName,0);
                }
            }
                //storeWorkspace.AppendValues("","-------------",-1);

            worksDefaultName = "Workspace"+MainClass.Settings.WorkspaceCount.ToString();
            TreeIter tiNewW = storeWorkspace.AppendValues(worksDefaultName,MainClass.Paths.WorkDir,2);

            if(!String.IsNullOrEmpty(currentWorkspace)){
                cbeWorkspace.Active =0;
            }
            else {
                feLocation.DefaultPath = MainClass.Paths.WorkDir;
开发者ID:moscrif,项目名称:ide,代码行数:67,代码来源:NewProjectWizzard_New.cs


注:本文中的ComboBoxEntry.PackStart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。