本文整理汇总了C#中Gtk.Frame.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Frame.Add方法的具体用法?C# Frame.Add怎么用?C# Frame.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Frame
的用法示例。
在下文中一共展示了Frame.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: 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 ();
}
示例3: DeclarationViewWindow
public DeclarationViewWindow()
: base(WindowType.Popup)
{
Gtk.Frame frame = new Gtk.Frame ();
frame.Add (label = new Label (""));
Add (frame);
}
示例4: 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 ();
}
示例5: 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 ();
}
示例6: 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 ();
}
示例7: 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);
}
示例8: 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);
}
示例9: 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 ();
}
示例10: DataGridView
public DataGridView()
: base()
{
frame = new Gtk.Frame ();
grid = new DataGrid ();
frame.Add (grid);
frame.ShowAll ();
}
示例11: 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 ();
}
示例12: 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);
}
}
示例13: 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 ();
}
示例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 ();
}
示例15: 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;
}