• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gtk.Frame类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Gtk.Frame的典型用法代码示例。如果您正苦于以下问题:C# Frame类的具体用法?C# Frame怎么用?C# Frame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Frame类属于Gtk命名空间,在下文中一共展示了Frame类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ConfigurationDialog

        public ConfigurationDialog (LCDService plugin)
        {
            this.plugin = plugin;
            Title = AddinManager.CurrentLocalizer.GetString ("LCD configuration");
            BorderWidth = 5;
            HasSeparator = false;
            Resizable = false;

            VBox lcdproc_box = new VBox ();

            HBox host_box = new HBox ();
            host_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Hostname:")), false, false, 3);
            host_entry = new Entry ();
            host_box.PackStart (host_entry, true, true, 3);
            host_entry.Text = this.plugin.Host;
            host_entry.Changed += new EventHandler (Host_Changed);

            HBox port_box = new HBox ();
            port_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Port:")), false, false, 3);
            port_spin = new SpinButton (1, 65535, 1);
            port_box.PackStart (port_spin, true, true, 3);
            port_spin.Value = this.plugin.Port;
            port_spin.Changed += new EventHandler (Port_Changed);

            Frame lcdproc_frame = new Frame (AddinManager.CurrentLocalizer.GetString ("LCDProc Daemon:"));
            lcdproc_box.PackStart (host_box);
            lcdproc_box.PackStart (port_box);
            lcdproc_frame.Add (lcdproc_box);
            lcdproc_frame.ShowAll ();

            VBox.PackStart (lcdproc_frame, false, false, 3);
            AddButton (Stock.Close, ResponseType.Close);
        }
开发者ID:h0rm,项目名称:No.Noise,代码行数:33,代码来源:ConfigurationDialog.cs


示例2: Build

 protected virtual void Build()
 {
     Gui.Initialize (this);
     // Widget BolPatcher.MenuGameWidget
     BinContainer.Attach (this);
     Name = "BolPatcher.MenuGameWidget";
     // Container child BolPatcher.MenuGameWidget.Gtk.Container+ContainerChild
     _frame1 = new Frame ();
     _frame1.Name = "frame1";
     _frame1.ShadowType = 0;
     // Container child frame1.Gtk.Container+ContainerChild
     _gtkAlignment = new Alignment (0F, 0F, 1F, 1F);
     _gtkAlignment.Name = "GtkAlignment";
     _gtkAlignment.LeftPadding = 12;
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     _button2 = new Button ();
     _button2.CanFocus = true;
     _button2.Name = "button2";
     _button2.UseUnderline = true;
     _button2.Label = Catalog.GetString ("GtkButton");
     _gtkAlignment.Add (_button2);
     _frame1.Add (_gtkAlignment);
     _gtkLabel1 = new Label ();
     _gtkLabel1.Name = "GtkLabel1";
     _gtkLabel1.LabelProp = Catalog.GetString ("<b>GtkFrame</b>");
     _gtkLabel1.UseMarkup = true;
     _frame1.LabelWidget = _gtkLabel1;
     Add (_frame1);
     if ((Child != null)) {
         Child.ShowAll ();
     }
     Hide ();
 }
开发者ID:githuis,项目名称:BolPatcher,代码行数:33,代码来源:BolPatcher.MenuGameWidget.cs


示例3: DeclarationViewWindow

 public DeclarationViewWindow()
     : base(WindowType.Popup)
 {
     Gtk.Frame frame = new Gtk.Frame ();
     frame.Add (label = new Label (""));
     Add (frame);
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:DeclarationViewWindow.cs


示例4: DemoColorSelection

		public DemoColorSelection () : base ("Color Selection")
		{
			BorderWidth = 8;
			VBox vbox = new VBox (false,8);
			vbox.BorderWidth = 8;
			Add (vbox);

			// Create the color swatch area
			Frame frame = new Frame ();
			frame.ShadowType = ShadowType.In;
			vbox.PackStart (frame, true, true, 0);

			drawingArea = new DrawingArea ();
			drawingArea.ExposeEvent += new ExposeEventHandler (ExposeEventCallback);
			// set a minimum size
			drawingArea.SetSizeRequest (200,200);
			// set the color
			color = new Gdk.Color (0, 0, 0xff);
			drawingArea.ModifyBg (StateType.Normal, color);
			frame.Add (drawingArea);

			Alignment alignment = new Alignment (1.0f, 0.5f, 0.0f, 0.0f);
			Button button = new Button ("_Change the above color");
			button.Clicked += new EventHandler (ChangeColorCallback);
			alignment.Add (button);
			vbox.PackStart (alignment);

			ShowAll ();
		}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:29,代码来源:DemoColorSelection.cs


示例5: InsightWindow

        public InsightWindow(SourceEditorView control, Project project, string fileName)
            : base(WindowType.Popup)
        {
            this.control             = control;
            this.fileName = fileName;
            this.project = project;
            /*System.Drawing.Point caretPos  = control.ActiveTextAreaControl.TextArea.Caret.Position;
            System.Drawing.Point visualPos = new System.Drawing.Point(control.ActiveTextAreaControl.TextArea.TextView.GetDrawingXPos(caretPos.Y, caretPos.X) + control.ActiveTextAreaControl.TextArea.TextView.DrawingPosition.X,
                      (int)((1 + caretPos.Y) * control.ActiveTextAreaControl.TextArea.TextView.FontHeight) - control.ActiveTextAreaControl.TextArea.VirtualTop.Y - 1 + control.ActiveTextAreaControl.TextArea.TextView.DrawingPosition.Y);*/

            //control.ActiveTextAreaControl.Caret.PositionChanged += new EventHandler(CaretOffsetChanged);
            //			control.TextAreaPainter.IHaveTheFocusChanged += focusEventHandler;

            AddEvents ((int) (Gdk.EventMask.KeyPressMask));
            this.SkipPagerHint = true;
            this.SkipTaskbarHint = true;
            this.Decorated = false;
            this.BorderWidth = 2;
            this.TypeHint = Gdk.WindowTypeHint.Dialog;

            desc = new Gtk.Label ("");
            current = new Gtk.Label ("");
            max = new Gtk.Label ("");
            HBox mainBox = new HBox (false, 2);
            mainBox.PackStart (new Gtk.Image (Gtk.Stock.GotoTop, Gtk.IconSize.Menu), false, false, 2);
            mainBox.PackStart (current, false, false, 2);
            mainBox.PackStart (new Gtk.Label (" of "), false, false, 2);
            mainBox.PackStart (max, false, false, 2);
            mainBox.PackStart (new Gtk.Image (Gtk.Stock.GotoBottom, Gtk.IconSize.Menu), false, false, 2);
            mainBox.PackStart (desc);
            Gtk.Frame framer = new Gtk.Frame ();
            framer.Add (mainBox);
            this.Add (framer);
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:34,代码来源:InsightWindow.cs


示例6: DemoColorSelection

		public DemoColorSelection () : base ("Color Selection")
		{
			BorderWidth = 8;
			VBox vbox = new VBox (false,8);
			vbox.BorderWidth = 8;
			Add (vbox);

			// Create the color swatch area
			Frame frame = new Frame ();
			frame.ShadowType = ShadowType.In;
			vbox.PackStart (frame, true, true, 0);

			drawingArea = new DrawingArea ();
			// set a minimum size
			drawingArea.SetSizeRequest (200,200);
			// set the color
			color.Red = 0;
			color.Green = 0;
			color.Blue = 1;
			color.Alpha = 1;
			drawingArea.OverrideBackgroundColor (StateFlags.Normal, color);
			frame.Add (drawingArea);

			Alignment alignment = new Alignment (1.0f, 0.5f, 0.0f, 0.0f);
			Button button = new Button ("_Change the above color");
			button.Clicked += new EventHandler (ChangeColorCallback);
			alignment.Add (button);
			vbox.PackStart (alignment, false, false, 0);

			ShowAll ();
		}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:31,代码来源:DemoColorSelection.cs


示例7: BuildInterface

        private void BuildInterface ()
        {
            NoShowAll = true;

            Alignment matchesAlignment = new Alignment (0.0f, 0.0f, 1.0f, 1.0f);
            matchesAlignment.SetPadding (5, 5, 5, 5);
            matchesAlignment.Add (terms_box);

            matchesFrame = new Frame (null);
            matchesFrame.Add (matchesAlignment);
            matchesFrame.LabelWidget = BuildMatchHeader ();
            matchesFrame.ShowAll ();

            terms_entry_box = new HBox ();
            terms_entry_box.Spacing = 8;
            terms_entry_box.PackStart (new Label (Catalog.GetString ("Condition:")), false, false, 0);
            terms_entry = new Entry ();
            terms_entry_box.PackStart (terms_entry, true, true, 0);

            limit_box.ShowAll ();

            PackStart(matchesFrame, true, true, 0);
            PackStart(terms_entry_box, false, false, 0);
            PackStart(limit_box, false, false, 0);

            //ShowAll ();
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:27,代码来源:QueryBox.cs


示例8: AudioView

        public AudioView()
        {
            //			this.WidthRequest = 500; //250;
            //			this.HeightRequest = 375; //187;

            Frame frame = new Frame();
            frame.BorderWidth = 5;
            frame.Show();

            VBox vbox = new VBox(false, 0);
            frame.Add(vbox);
            vbox.Show();

            Label label = new Label(Catalog.GetString("Audio Chat in progress..."));

            label.Show();
            vbox.PackStart(label, false, true, 5);

            Button button = new Button(Catalog.GetString("End Call"));
            button.Clicked += OnCloseAudioClicked;
            button.Show();
            vbox.PackStart(button, false, true, 5);

            this.Add(frame);
        }
开发者ID:GNOME,项目名称:banter,代码行数:25,代码来源:AudioView.cs


示例9: build

        protected void build()
        {
            this.SetDefaultSize (1000, 600);
            this.Title = "Battle";
            this.DeleteEvent += HandleDeleteEvent;

            this.vbox = new VBox ();

            this.tbar = new Toolbar ();
            this.tbar.ToolbarStyle = ToolbarStyle.BothHoriz;
            this.about = new ToolButton (Stock.About);
            this.about.IsImportant = false;
            this.about.Label = "About";
            this.about.TooltipText = "About this application";
            this.tbar.Add (this.about);

            this.hpaned = new HPaned ();
            this.frame = new Frame ("Battle Map");
            this.map = new MapControl ();
            this.frame.Add (this.map);
            Label a = new Label ("Welcome");
            this.hpaned.Pack1 (a, false, false);
            this.hpaned.Pack2 (this.frame, true, true);

            this.sbar = new Statusbar ();

            this.vbox.PackStart (this.tbar, false, true, 0);
            this.vbox.PackStart (this.hpaned, true, true, 0);
            this.vbox.PackEnd (this.sbar, false, true, 0);

            this.Add (this.vbox);
        }
开发者ID:sgtnasty,项目名称:battle,代码行数:32,代码来源:BattleWindow.cs


示例10: ChessGameWidget

        public ChessGameWidget(Widget board)
        {
            whiteLabel = new Label ();
            blackLabel = new Label ();

            blackClock = new ChessClock ();
            blackHBox = new HBox ();
            blackHBox.PackStart (blackLabel, true, true, 2);
            blackHBox.PackStart (blackClock, false, false, 2);

            whiteClock = new ChessClock ();
            whiteHBox = new HBox ();
            whiteHBox.PackStart (whiteLabel, true, true, 2);
            whiteHBox.PackStart (whiteClock, false, false, 2);

            topBin = new Frame ();
            bottomBin = new Frame ();

            whiteAtBottom = true;
            topBin.Add (blackHBox);
            bottomBin.Add (whiteHBox);

            PackStart (topBin, false, false, 2);
            PackStart (board, true, true, 2);
            PackStart (bottomBin, false, false, 2);

            topBin.ShowAll ();
            bottomBin.ShowAll ();
        }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:29,代码来源:ChessGameWidget.cs


示例11: DataGridView

 public DataGridView()
     : base()
 {
     frame = new Gtk.Frame ();
     grid = new DataGrid ();
     frame.Add (grid);
     frame.ShowAll ();
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:8,代码来源:DataGridView.cs


示例12: DemoStockBrowser

		public DemoStockBrowser () : base ("Stock Icons and Items")
		{
			SetDefaultSize (-1, 500);
			BorderWidth = 8;

			HBox hbox = new HBox (false, 8);
			Add (hbox);

			ScrolledWindow sw = new ScrolledWindow ();
			sw.SetPolicy (PolicyType.Never, PolicyType.Automatic);
			hbox.PackStart (sw, false, false, 0);

			ListStore model = CreateModel ();

			TreeView treeview = new TreeView (model);
			sw.Add (treeview);

			TreeViewColumn column = new TreeViewColumn ();
			column.Title = "Name";
			CellRenderer renderer = new CellRendererPixbuf ();
			column.PackStart (renderer, false);
			column.SetAttributes (renderer, "stock_id", Column.Id);
			renderer = new CellRendererText ();
			column.PackStart (renderer, true);
			column.SetAttributes (renderer, "text", Column.Name);

			treeview.AppendColumn (column);
			treeview.AppendColumn ("Label", new CellRendererText (), "text", Column.Label);
			treeview.AppendColumn ("Accel", new CellRendererText (), "text", Column.Accel);
			treeview.AppendColumn ("ID", new CellRendererText (), "text", Column.Id);

			Alignment align = new Alignment (0.5f, 0.0f, 0.0f, 0.0f);
			hbox.PackEnd (align, false, false, 0);

			Frame frame = new Frame ("Selected Item");
			align.Add (frame);

			VBox vbox = new VBox (false, 8);
			vbox.BorderWidth = 8;
			frame.Add (vbox);

			typeLabel = new Label ();
			vbox.PackStart (typeLabel, false, false, 0);
			iconImage = new Gtk.Image ();
			vbox.PackStart (iconImage, false, false, 0);
			accelLabel = new Label ();
			vbox.PackStart (accelLabel, false, false, 0);
			nameLabel = new Label ();
			vbox.PackStart (nameLabel, false, false, 0);
			idLabel = new Label ();
			vbox.PackStart (idLabel, false, false, 0);

			treeview.Selection.Mode = Gtk.SelectionMode.Single;
			treeview.Selection.Changed += new EventHandler (SelectionChanged);

			ShowAll ();
		}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:57,代码来源:DemoStockBrowser.cs


示例13: Initialise

		public void Initialise (MonoDevelopProxy proxy, Frame designerFrame)
		{
			System.Diagnostics.Trace.WriteLine ("Creating AspNetEdit EditorHost");
			host = new EditorHost (proxy);
			host.Initialise ();
			System.Diagnostics.Trace.WriteLine ("Created AspNetEdit EditorHost");
			
			//StartGuiThread ();
			Gtk.Application.Invoke ( delegate { LoadGui (designerFrame); });
		}
开发者ID:segaman,项目名称:monodevelop,代码行数:10,代码来源:EditorProcess.cs


示例14: DemoDrawingArea

		public DemoDrawingArea () : base ("Drawing Area")
		{
			BorderWidth = 8;

			VBox vbox = new VBox (false, 8);
			vbox.BorderWidth = 8;
			Add (vbox);

			// Create the checkerboard area
			Label label = new Label ("<u>Checkerboard pattern</u>");
			label.UseMarkup = true;
			vbox.PackStart (label, false, false, 0);

			Frame frame = new Frame ();
			frame.ShadowType = ShadowType.In;
			vbox.PackStart (frame, true, true, 0);

			DrawingArea da = new DrawingArea ();
			// set a minimum size
			da.SetSizeRequest (100,100);
			frame.Add (da);
			da.ExposeEvent += new ExposeEventHandler (CheckerboardExpose);

			// Create the scribble area
			label = new Label ("<u>Scribble area</u>");
			label.UseMarkup = true;
			vbox.PackStart (label, false, false, 0);

			frame = new Frame ();
			frame.ShadowType = ShadowType.In;
			vbox.PackStart (frame, true, true, 0);

			da = new DrawingArea ();
			// set a minimum size
			da.SetSizeRequest (100, 100);
			frame.Add (da);

			// Signals used to handle backing pixmap
			da.ExposeEvent += new ExposeEventHandler (ScribbleExpose);
			da.ConfigureEvent += new ConfigureEventHandler (ScribbleConfigure);

			// Event signals
			da.MotionNotifyEvent += new MotionNotifyEventHandler (ScribbleMotionNotify);
			da.ButtonPressEvent += new ButtonPressEventHandler (ScribbleButtonPress);


			// Ask to receive events the drawing area doesn't normally
			// subscribe to
			da.Events |= EventMask.LeaveNotifyMask | EventMask.ButtonPressMask |
				EventMask.PointerMotionMask | EventMask.PointerMotionHintMask;

			ShowAll ();
		}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:53,代码来源:DemoDrawingArea.cs


示例15: Initialize

		public void Initialize (PropertyDescriptor prop)
		{
			if (!prop.PropertyType.IsEnum)
				throw new ApplicationException ("Flags editor does not support editing values of type " + prop.PropertyType);
				
			property = prop.Label;
			Spacing = 3;

			// For small enums, the editor is a list of checkboxes inside a frame
			// For large enums (>5), use a selector dialog.

			enm = Registry.LookupEnum (prop.PropertyType.FullName);
			
			if (enm.Values.Length < 6) 
			{
				Gtk.VBox vbox = new Gtk.VBox (true, 3);

				flags = new Hashtable ();

				foreach (Enum value in enm.Values) {
					EnumValue eval = enm[value];
					if (eval.Label == "")
						continue;

					Gtk.CheckButton check = new Gtk.CheckButton (eval.Label);
					check.TooltipText = eval.Description;
					uint uintVal = (uint) Convert.ToInt32 (eval.Value);
					flags[check] = uintVal;
					flags[uintVal] = check;
					
					check.Toggled += FlagToggled;
					vbox.PackStart (check, false, false, 0);
				}

				Gtk.Frame frame = new Gtk.Frame ();
				frame.Add (vbox);
				frame.ShowAll ();
				PackStart (frame, true, true, 0);
			} 
			else 
			{
				flagsLabel = new Gtk.Entry ();
				flagsLabel.IsEditable = false;
				flagsLabel.HasFrame = false;
				flagsLabel.ShowAll ();
				PackStart (flagsLabel, true, true, 0);
				
				Gtk.Button but = new Gtk.Button ("...");
				but.Clicked += OnSelectFlags;
				but.ShowAll ();
				PackStart (but, false, false, 0);
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:53,代码来源:Flags.cs


示例16: Attach

		public void Attach (DockToolbar bar)
		{
			this.bar = bar;
			bar.FloatingDock = this;
			Frame f = new Frame ();
			f.Shadow = ShadowType.Out;
			f.Add (bar);
			Add (f);
			f.Show ();
			bar.Show ();
			Show ();
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:12,代码来源:FloatingDock.cs


示例17: VideoView

        public VideoView()
        {
            preview_pos = PreviewPos.ButtonRight;

            VBox vbox = new VBox(false, 0);
            vbox.Show();

            Frame frame = new Frame();
            //frame.BorderWidth = 5;
            frame.Show();

            vbox.Add(frame);

            mainView = new Gtk.EventBox();
            mainView.WidthRequest = 400;
            mainView.HeightRequest = 300;
            mainView.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (255,255,255));
            mainView.ModifyBg (Gtk.StateType.Active, new Gdk.Color (255,255,255));
            mainView.Show();

            //this.WidthRequest = 333; // 500; //250;
            //this.HeightRequest = 250; // 375; //187; 250
            preview = new Gtk.DrawingArea ();
            preview.WidthRequest = 120; // 75; //150;
            preview.HeightRequest = 90; // 56; //112;
            preview.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0,0,0));
            preview.ModifyBg (Gtk.StateType.Active, new Gdk.Color (0,0,0));
            preview.Show();

            fix = new Gtk.Fixed ();
            fix.Put (preview, space, space);
            fix.Show();
            mainView.Add(fix);

            frame.Add(mainView);

            //			Label label = new Label(Catalog.GetString("Video Chat in progress..."));

            //			label.Show();
            //			vbox.PackStart(label, false, true, 0);

            Button button = new Button(Catalog.GetString("End Call"));
            button.Clicked += OnCloseVideoClicked;
            button.Show();
            vbox.PackStart(button, false, false, 5);

            this.Add(vbox);
            mainView.SizeAllocated += OnSizeAllocated;
            //			this.SizeRequested += OnsizeRequested;
            this.QueueResize ();
            MovePreview ();
        }
开发者ID:GNOME,项目名称:banter,代码行数:52,代码来源:VideoView.cs


示例18: Create

		public static Gtk.Window Create ()
		{
			window = new Dialog ();
			window.Title = "Sized groups";
			window.Resizable = false;
			
			VBox vbox = new VBox (false, 5);
			window.VBox.PackStart (vbox, true, true, 0);
			vbox.BorderWidth = 5;

			size_group = new SizeGroup (SizeGroupMode.Horizontal);

			Frame frame = new Frame ("Color Options");
			vbox.PackStart (frame, true, true, 0);

			Table table = new Table (2, 2, false);
			table.BorderWidth = 5;
			table.RowSpacing = 5;
			table.ColumnSpacing = 10;
			frame.Add (table);

			string [] colors = {"Red", "Green", "Blue", };
			string [] dashes = {"Solid", "Dashed", "Dotted", };
			string [] ends = {"Square", "Round", "Arrow", };

			Add_Row (table, 0, size_group, "_Foreground", colors);
			Add_Row (table, 1, size_group, "_Background", colors);

			frame = new Frame ("Line Options");
			vbox.PackStart (frame, false, false, 0);

			table = new Table (2, 2, false);
			table.BorderWidth = 5;
			table.RowSpacing = 5;
			table.ColumnSpacing = 10;
			frame.Add (table);

			Add_Row (table, 0, size_group, "_Dashing", dashes);
			Add_Row (table, 1, size_group, "_Line ends", ends);

			CheckButton check_button = new CheckButton ("_Enable grouping");
			vbox.PackStart (check_button, false, false, 0);
			check_button.Active = true;
			check_button.Toggled += new EventHandler (Button_Toggle_Cb);

			Button close_button = new Button (Stock.Close);
			close_button.Clicked += new EventHandler (Close_Button);
			window.ActionArea.PackStart (close_button, false, false, 0);
			
			window.ShowAll ();
			return window;
		}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:52,代码来源:TestSizeGroup.cs


示例19: RemoteDesignerProcess

		public RemoteDesignerProcess ()
		{
			Application.Init ();
			
			designerFrame = new Gtk.Frame ();
			propGridFrame = new Gtk.Frame ();
			designerFrame.Shadow = ShadowType.None;
			propGridFrame.Shadow = ShadowType.None;
			designerFrame.BorderWidth = 0;
			
			designerFrame.Show ();
			propGridFrame.Show ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:13,代码来源:RemoteDesignerProcess.cs


示例20: InitializeComponent

        private void InitializeComponent()
        {
            this.Title = "Search Errors";
             this.Modal = false;
             this.WindowPosition = Gtk.WindowPosition.CenterOnParent;
             this.Resizable = true;
             this.SetDefaultSize(480, 320);
             this.IconName = Stock.DialogError;
             this.AddButton(Stock.Close, Gtk.ResponseType.Close);

             Gtk.Frame treeFrame = new Gtk.Frame();
             treeFrame.Shadow = ShadowType.In;
             Gtk.ScrolledWindow treeWin = new Gtk.ScrolledWindow();
             tvErrors = new Gtk.TreeView ();
             tvErrors.SetSizeRequest(480,200);
             tvErrors.Selection.Mode = SelectionMode.Single;

             tvErrors.AppendColumn(CreateTreeViewColumn("Name", 60, 0));
             tvErrors.AppendColumn(CreateTreeViewColumn("Located In", 200, 1));

             lsErrors = new Gtk.ListStore(typeof (string), typeof (string), typeof(string));
             tvErrors.Model = lsErrors;
             tvErrors.Selection.Changed += new EventHandler(tvErrors_Selection_Changed);

             treeWin.Add(tvErrors);
             treeFrame.BorderWidth = 0;
             treeFrame.Add(treeWin);

             for (int i=0; i< alErrors.Count; i++)
             {
            MessageEventArgs args = (MessageEventArgs)alErrors[i];
            if (args.ErrorFile == null)
               lsErrors.AppendValues("General Error", string.Empty, args.Message);
            else
               lsErrors.AppendValues(args.ErrorFile.Name, args.ErrorFile.DirectoryName, args.Message);
             }

             Gtk.Frame txtFrame = new Gtk.Frame();
             txtFrame.Shadow = ShadowType.In;
             Gtk.ScrolledWindow txtScrollWin = new Gtk.ScrolledWindow();
             txtErrorDetails = new TextView();
             txtErrorDetails.WrapMode = Gtk.WrapMode.WordChar;
             txtErrorDetails.Editable = false;
             txtScrollWin.Add(txtErrorDetails);
             txtFrame.BorderWidth = 0;
             txtFrame.Add(txtScrollWin);

             this.VBox.PackStart(treeFrame, true, true, 3);
             this.VBox.PackEnd(txtFrame, true, true, 3);
             this.VBox.ShowAll();
        }
开发者ID:joshball,项目名称:astrogrep,代码行数:51,代码来源:frmErrorLog.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gtk.HBox类代码示例发布时间:2022-05-26
下一篇:
C# Gtk.FileFilter类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap