本文整理汇总了C#中Gtk.VBox类的典型用法代码示例。如果您正苦于以下问题:C# VBox类的具体用法?C# VBox怎么用?C# VBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VBox类属于Gtk命名空间,在下文中一共展示了VBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main()
{
BusG.Init ();
Application.Init ();
btn = new Button ("Click me");
btn.Clicked += OnClick;
VBox vb = new VBox (false, 2);
vb.PackStart (btn, false, true, 0);
Window win = new Window ("D-Bus#");
win.SetDefaultSize (640, 480);
win.Add (vb);
win.Destroyed += delegate {Application.Quit ();};
win.ShowAll ();
bus = Bus.Session;
string bus_name = "org.ndesk.gtest";
ObjectPath path = new ObjectPath ("/org/ndesk/btn");
if (bus.RequestName (bus_name) == RequestNameReply.PrimaryOwner) {
bus.Register (path, btn);
rbtn = btn;
} else {
rbtn = bus.GetObject<Button> (bus_name, path);
}
//run the main loop
Application.Run ();
}
开发者ID:bl8,项目名称:dbus-sharp-glib,代码行数:32,代码来源:TestUI.cs
示例2: LastfmSourceContents
// "Coming Soon: Profile, Friends, Events etc")
public LastfmSourceContents () : base ()
{
HscrollbarPolicy = PolicyType.Never;
VscrollbarPolicy = PolicyType.Automatic;
viewport = new Viewport ();
viewport.ShadowType = ShadowType.None;
main_box = new VBox ();
main_box.Spacing = 6;
main_box.BorderWidth = 5;
main_box.ReallocateRedraws = true;
// Clamp the width, preventing horizontal scrolling
SizeAllocated += delegate (object o, SizeAllocatedArgs args) {
// TODO '- 10' worked for Nereid, but not for Cubano; properly calculate the right width we should request
main_box.WidthRequest = args.Allocation.Width - 30;
};
viewport.Add (main_box);
StyleSet += delegate {
viewport.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
viewport.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
};
AddWithFrame (viewport);
ShowAll ();
}
开发者ID:haugjan,项目名称:banshee-hacks,代码行数:30,代码来源:LastfmSourceContents.cs
示例3: CanvasExample
public CanvasExample () {
Gtk.Window win = new Gtk.Window ("Canvas example");
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
VBox vbox = new VBox (false, 0);
win.Add (vbox);
vbox.PackStart (new Label ("Drag - move object.\n" +
"Double click - change color\n" +
"Right click - delete object"),
false, false, 0);
canvas = new Canvas ();
canvas.SetSizeRequest (width, height);
canvas.SetScrollRegion (0.0, 0.0, (double) width, (double) height);
vbox.PackStart (canvas, false, false, 0);
HBox hbox = new HBox (false, 0);
vbox.PackStart (hbox, false, false, 0);
Button add_button = new Button ("Add an object");
add_button.Clicked += new EventHandler (AddObject);
hbox.PackStart (add_button, false, false, 0);
Button quit_button = new Button ("Quit");
quit_button.Clicked += new EventHandler (Quit);
hbox.PackStart (quit_button, false, false, 0);
win.ShowAll ();
}
开发者ID:directhex,项目名称:xamarin-gnome-sharp2,代码行数:30,代码来源:CanvasExample.cs
示例4: NodeKeyInfo
public NodeKeyInfo(NodeKey key)
: base(Gtk.WindowType.Toplevel)
{
this.Build ();
int childNodes = key.ChildNodes != null ? key.ChildNodes.Count : 0;
int values = key.ChildValues != null ? key.ChildValues.Count : 0;
byte[] classnameData = key.ClassnameData != null ? key.ClassnameData : new byte[] {};
string name = key.Name != null ? key.Name : string.Empty;
DateTime timestamp = key.Timestamp != null ? key.Timestamp : DateTime.MinValue;
Label nameLabel = new Label("Name: " + name);
Label timestampLabel = new Label("Timestamp: " + timestamp.ToLongDateString());
Label childNodesLabel = new Label("Child nodes: " + childNodes);
Label valueCountLabel = new Label("Values: " + values);
//Label data = new Label(BitConverter.ToString(classnameData).Replace('-', ' '));
VBox box = new VBox();
box.PackStart(nameLabel, false, false, 30);
box.PackStart(timestampLabel, false, false, 30);
box.PackStart(childNodesLabel, false, false, 30);
box.PackStart(valueCountLabel, false, false, 30);
//data.Wrap = true;
//box.PackStart(data, false, false, 0);
this.Add(box);
this.ShowAll();
}
开发者ID:brandonprry,项目名称:volatile_reader,代码行数:29,代码来源:NodeKeyInfo.cs
示例5: DockToolbarFrame
public DockToolbarFrame ()
{
vbox = new VBox ();
Add (vbox);
DockToolbarPanel topPanel = new DockToolbarPanel (this, Placement.Top);
DockToolbarPanel bottomPanel = new DockToolbarPanel (this, Placement.Bottom);
DockToolbarPanel leftPanel = new DockToolbarPanel (this, Placement.Left);
DockToolbarPanel rightPanel = new DockToolbarPanel (this, Placement.Right);
panels = new DockToolbarPanel [4];
panels [(int)Placement.Top] = topPanel;
panels [(int)Placement.Bottom] = bottomPanel;
panels [(int)Placement.Left] = leftPanel;
panels [(int)Placement.Right] = rightPanel;
vbox.PackStart (topPanel, false, false, 0);
HBox hbox = new HBox ();
contentBox = new VBox ();
hbox.PackStart (leftPanel, false, false, 0);
hbox.PackStart (contentBox, true, true, 0);
hbox.PackStart (rightPanel, false, false, 0);
vbox.PackStart (hbox, true, true, 0);
vbox.PackStart (bottomPanel, false, false, 0);
this.Events = EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.PointerMotionMask;
ShowAll ();
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:31,代码来源:DockToolbarFrame.cs
示例6: ParameterInformationWindow
public ParameterInformationWindow()
{
desc = new Gtk.Label ("");
desc.Xalign = 0;
desc.Wrap = true;
count = new Gtk.Label ("");
mainBox = new HBox (false, 2);
mainBox.BorderWidth = 3;
HBox arrowHBox = new HBox ();
goPrev = new Gtk.Arrow (Gtk.ArrowType.Up, ShadowType.None);
arrowHBox.PackStart (goPrev, false, false, 0);
arrowHBox.PackStart (count, false, false, 0);
goNext = new Gtk.Arrow (Gtk.ArrowType.Down, ShadowType.None);
arrowHBox.PackStart (goNext, false, false, 0);
VBox vBox = new VBox ();
vBox.PackStart (arrowHBox, false, false, 0);
mainBox.PackStart (vBox, false, false, 0);
mainBox.PackStart (desc, true, true, 0);
mainBox.ShowAll ();
this.Add (mainBox);
EnableTransparencyControl = true;
}
开发者ID:moscrif,项目名称:ide,代码行数:28,代码来源:ParameterInformationWindow.cs
示例7: SplashScreenForm
//this is a popup so it behaves like other splashes on Windows, i.e. doesn't show up as a second window in the taskbar.
public SplashScreenForm () : base (Gtk.WindowType.Popup)
{
AppPaintable = true;
this.Decorated = false;
this.WindowPosition = WindowPosition.Center;
this.TypeHint = Gdk.WindowTypeHint.Splashscreen;
try {
using (var stream = BrandingService.GetStream ("SplashScreen.png", true))
bitmap = new Gdk.Pixbuf (stream);
} catch (Exception e) {
LoggingService.LogError ("Can't load splash screen pixbuf 'SplashScreen.png'.", e);
}
progress = new ProgressBar();
progress.Fraction = 0.00;
progress.HeightRequest = 6;
vbox = new VBox();
vbox.BorderWidth = 12;
label = new Gtk.Label ();
label.UseMarkup = true;
label.Xalign = 0;
vbox.PackEnd (progress, false, true, 0);
vbox.PackEnd (label, false, true, 3);
this.Add (vbox);
if (bitmap != null)
this.Resize (bitmap.Width, bitmap.Height);
}
开发者ID:nieve,项目名称:monodevelop,代码行数:28,代码来源:SplashScreen.cs
示例8: ComboBoxDialog
public ComboBoxDialog()
{
Title = "Gtk Combo Box Dialog";
WidthRequest = 500;
HeightRequest = 400;
var vbox = new VBox ();
this.VBox.PackStart (vbox);
comboBox = new ComboBox ();
vbox.PackStart (comboBox, false, false, 0);
listStore = new ListStore (typeof(string), typeof(ComboBoxItem));
comboBox.Model = listStore;
var cell = new CellRendererText ();
comboBox.PackStart (cell, true);
comboBox.AddAttribute (cell, "text", 0);
AddItems ();
Child.ShowAll ();
Show ();
}
开发者ID:mrward,项目名称:test-xwt-memory-leak,代码行数:25,代码来源:ComboBoxDialog.cs
示例9: BDialog
public BDialog(string aName, Gtk.Window aParent, string aText)
: base(aName, aParent, Gtk.DialogFlags.NoSeparator)
{
// setup dialog
this.Modal = true;
this.BorderWidth = 6;
this.HasSeparator = false;
this.Resizable = false;
this.VBox.Spacing=12;
// graphic items
hbox = new Gtk.HBox();
Gtk.VBox labelBox = new VBox();
label = new Gtk.Label();
image = new Gtk.Image();
hbox.Spacing=12;
hbox.BorderWidth=6;
this.VBox.Add(hbox);
// set-up image
image.Yalign=0.0F;
hbox.Add(image);
// set-up label
label.Yalign=0.0F;
label.Xalign=0.0F;
label.UseMarkup=true;
label.Wrap=true;
label.Markup=aText;
// add to dialog
labelBox.Add(label);
hbox.Add(labelBox);
}
开发者ID:BackupTheBerlios,项目名称:beline-svn,代码行数:35,代码来源:Dialogs.cs
示例10: CreateButton
public Gtk.Button CreateButton()
{
Gtk.VBox vbox = new Gtk.VBox();
Gtk.Image image = new Gtk.Image();
string photoFile = Util.GetPhotoFileName(true, p.UniqueID);
if(photoFile != "" && File.Exists(photoFile)) {
try {
Pixbuf pixbuf = new Pixbuf (photoFile); //from a file
image.Pixbuf = pixbuf;
image.Visible = true;
}
catch {
LogB.Warning("catched while adding photo");
}
}
Gtk.Label label_id = new Gtk.Label(p.UniqueID.ToString());
label_id.Visible = false; //hide this to the user
Gtk.Label label_name = new Gtk.Label(p.Name);
label_name.Visible = true;
vbox.PackStart(image);
vbox.PackStart(label_id);
vbox.PackEnd(label_name, false, false, 1);
vbox.Show();
Button b = new Button(vbox);
b.WidthRequest=150;
return b;
}
开发者ID:GNOME,项目名称:chronojump,代码行数:34,代码来源:personSelect.cs
示例11: DockFrame
public DockFrame ()
{
shadedContainer = new ShadedContainer ();
dockBarTop = new DockBar (this, Gtk.PositionType.Top);
dockBarBottom = new DockBar (this, Gtk.PositionType.Bottom);
dockBarLeft = new DockBar (this, Gtk.PositionType.Left);
dockBarRight = new DockBar (this, Gtk.PositionType.Right);
container = new DockContainer (this);
HBox hbox = new HBox ();
hbox.PackStart (dockBarLeft, false, false, 0);
hbox.PackStart (container, true, true, 0);
hbox.PackStart (dockBarRight, false, false, 0);
mainBox = new VBox ();
mainBox.PackStart (dockBarTop, false, false, 0);
mainBox.PackStart (hbox, true, true, 0);
mainBox.PackStart (dockBarBottom, false, false, 0);
Add (mainBox);
mainBox.ShowAll ();
mainBox.NoShowAll = true;
CompactGuiLevel = 2;
dockBarTop.UpdateVisibility ();
dockBarBottom.UpdateVisibility ();
dockBarLeft.UpdateVisibility ();
dockBarRight.UpdateVisibility ();
}
开发者ID:nieve,项目名称:monodevelop,代码行数:27,代码来源:DockFrame.cs
示例12: build
private void build()
{
this.vbox1 = new VBox();
this.toolbar1 = new Toolbar();
this.aboutbtn1 = new ToolButton(Stock.About);
this.aboutbtn1.Label = "About";
this.aboutbtn1.IsImportant = true;
this.toolbar1.ToolbarStyle = ToolbarStyle.BothHoriz;
this.toolbar1.Add(this.aboutbtn1);
this.vbox1.PackStart(this.toolbar1, false, true, 0);
this.treestore1 = this.populateTreeStoreFromSession();
this.scrollw1 = new ScrolledWindow();
this.hpaned1 = new HPaned();
this.treeview1 = new TreeView(this.treestore1);
this.treeview1.HeadersVisible = true;
this.treeview1.AppendColumn("Session", new CellRendererText(), "text", 0);
this.treeview1.AppendColumn("Name", new CellRendererText(), "text", 1);
this.treeview1.ExpandAll();
this.scrollw1.Add(this.treeview1);
this.iconview1 = new IconView();
this.hpaned1.Add1(this.scrollw1);
this.hpaned1.Add2(this.iconview1);
this.hpaned1.Position = 254;
this.vbox1.PackStart(this.hpaned1, true, true, 0);
this.statusbar1 = new Statusbar();
this.vbox1.PackEnd(this.statusbar1, false, true, 0);
this.Add(this.vbox1);
this.SetSizeRequest(800,600);
this.DeleteEvent += HandleDeleteEvent;
}
开发者ID:sgtnasty,项目名称:battle,代码行数:35,代码来源:MainWindow.cs
示例13: BuildLayout
void BuildLayout ()
{
primary_vbox = new VBox ();
var label = new Label ("Super duper test UI!");
label.Show ();
primary_vbox.Add (label);
var button_box = new HButtonBox ();
button_box.Show ();
primary_vbox.Add (button_box);
var folder_button = new FileChooserButton ("Select import folder", FileChooserAction.SelectFolder);
folder_button.FileSet += delegate {
folder = folder_button.Uri;
Log.Information ("Selected " + folder);
};
folder_button.Show ();
button_box.Add (folder_button);
var import_button = new Button { Label = "Start Import" };
import_button.Activated += StartImport;
import_button.Clicked += StartImport;
import_button.Show ();
button_box.Add (import_button);
primary_vbox.Show ();
Add (primary_vbox);
}
开发者ID:tigger,项目名称:tripod,代码行数:29,代码来源:MainWindow.cs
示例14: TrackInfoPopup
public TrackInfoPopup()
: base(Gtk.WindowType.Popup)
{
BorderWidth = 8;
AppPaintable = true;
Resizable = false;
TypeHint = Gdk.WindowTypeHint.Notification;
VBox box = new VBox ();
box.Spacing = 4;
header = new ClassicTrackInfoDisplay ();
header.SetSizeRequest (320, 64);
seek_slider = new ConnectedSeekSlider (SeekSliderLayout.Horizontal);
seek_slider.StreamPositionLabel.FormatString = "<small>{0}</small>";
seek_slider.LeftPadding = 0;
seek_slider.RightPadding = 0;
box.PackStart (header, true, true, 0);
box.PackStart (seek_slider, false, false, 0);
Add (box);
box.ShowAll ();
}
开发者ID:knocte,项目名称:banshee,代码行数:25,代码来源:TrackInfoPopup.cs
示例15: Build
private void Build()
{
global::Stetic.Gui.Initialize(this);
this.Name = "Client.Forms.MicroChat";
this.Title = "Micro chat";
this.Icon = global::Gdk.Pixbuf.LoadFromResource("Client.Resources.pigeon_clip_art_hight.ico");
this.WindowPosition = Gtk.WindowPosition.Center;
vbox = new VBox();
scrollback_mc = new Scrollback();
scrollback_mc.isMicro = true;
scrollback_mc.Create();
this.TypeHint = Gdk.WindowTypeHint.Normal;
this.DefaultHeight = 420;
this.DefaultWidth = 680;
scrollback_mc.Events = ((global::Gdk.EventMask)(256));
scrollback_mc.Name = "scrollback1";
this.DeleteEvent += new DeleteEventHandler(Close);
vbox.Add(scrollback_mc);
this.Add(vbox);
if ((this.Child != null))
{
this.Child.ShowAll();
}
this.Hide();
}
开发者ID:JGunning,项目名称:OpenAIM,代码行数:25,代码来源:MicroChat.cs
示例16: SdiWorkspaceWindow
public SdiWorkspaceWindow (DefaultWorkbench workbench, IViewContent content, Notebook tabControl, TabLabel tabLabel) : base ()
{
this.workbench = workbench;
this.tabControl = tabControl;
this.content = content;
this.tabLabel = tabLabel;
this.tabPage = content.Control;
content.WorkbenchWindow = this;
content.ContentNameChanged += new EventHandler(SetTitleEvent);
content.DirtyChanged += new EventHandler(SetTitleEvent);
content.BeforeSave += new EventHandler(BeforeSave);
content.ContentChanged += new EventHandler (OnContentChanged);
ShadowType = ShadowType.None;
box = new VBox ();
box.PackStart (content.Control);
Add (box);
box.Show ();
SetTitleEvent(null, null);
commandHandler = new ViewCommandHandlers (this);
Show ();
}
开发者ID:acken,项目名称:monodevelop,代码行数:26,代码来源:SdiWorkspaceWindow.cs
示例17: Shell
public Shell()
: base("Mono Heap Profiler")
{
entries = new ActionEntry[] {
new ActionEntry ("FileMenu", null, "_File", null, null, null),
new ActionEntry ("OpenAction", Stock.Open, null, "<control>O", "Open a profile...", new EventHandler (OnOpen)),
new ActionEntry ("QuitAction", Stock.Quit, null, "<control>Q", "Quit the application", delegate { Application.Quit (); }),
};
DefaultSize = new Gdk.Size (700, 700);
DeleteEvent += delegate { Application.Quit (); };
main_box = new VBox (false, 0);
Add (main_box);
shell_commands = new ActionGroup ("TestActions");
shell_commands.Add (entries);
uim = new UIManager ();
uim.AddWidget += delegate (object obj, AddWidgetArgs args) {
args.Widget.Show ();
main_box.PackStart (args.Widget, false, true, 0);
};
uim.ConnectProxy += OnProxyConnect;
uim.InsertActionGroup (shell_commands, 0);
uim.AddUiFromResource ("shell-ui.xml");
AddAccelGroup (uim.AccelGroup);
sb = new Statusbar ();
main_box.PackEnd (sb, false, true, 0);
pager = new ShellPager (this);
main_box.PackEnd (pager, true, true, 0);
}
开发者ID:mono,项目名称:heap-prof,代码行数:35,代码来源:Shell.cs
示例18: 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
示例19: DemoApplicationWindow
public DemoApplicationWindow () : base ("Application Window")
{
SetDefaultSize (200, 200);
vbox = new VBox (false, 0);
Add (vbox);
AddActions ();
statusbar = new Statusbar ();
UpdateStatus ();
vbox.PackEnd (statusbar, false, false, 0);
ScrolledWindow sw = new ScrolledWindow ();
sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
sw.ShadowType = ShadowType.In;
vbox.PackEnd (sw, true, true, 0);
TextView textview = new TextView ();
textview.Buffer.MarkSet += new MarkSetHandler (MarkSet);
sw.Add (textview);
textview.GrabFocus ();
ShowAll ();
}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:26,代码来源:DemoApplicationWindow.cs
示例20: AddTwitts
/// <summary>
/// Add the twitts to the box
/// </summary>
public void AddTwitts()
{
if (w4 != null) {
w4.Destroy ();
w4 = null;
}
w4 = new Gtk.Viewport ();
w4.ShadowType = ((Gtk.ShadowType)(0));
scrolledwindow.Add (w4);
area_status = null;
scrolledwindow.Remove (area_status);
// Container child GtkViewport.Gtk.Container+ContainerChild
area_status = new Gtk.VBox ();
area_status.Name = "area_status";
area_status.Spacing = 6;
w4.Add (area_status);
scrolledwindow.Add (w4);
Status [] sts = ObjectCalls.GetPublicTimeline ();
foreach (Status st in sts) {
StatusViewItem stItem = new StatusViewItem (st);
area_status.Add (stItem);
if (st.StatusId != sts [sts.Length - 1].StatusId)
area_status.Add (new Gtk.HSeparator ());
}
}
开发者ID:igorgue,项目名称:mono-twitts,代码行数:32,代码来源:MainWindow.cs
注:本文中的Gtk.VBox类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论