本文整理汇总了C#中Gtk.HBox.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# HBox.ShowAll方法的具体用法?C# HBox.ShowAll怎么用?C# HBox.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.HBox
的用法示例。
在下文中一共展示了HBox.ShowAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: AddMessage
public void AddMessage (string msg, string icon)
{
if (lastImage != null) {
HSeparator sep = new HSeparator ();
sep.Show ();
msgBox.PackStart (sep);
lastImage.IconSize = (int) Gtk.IconSize.Button;
}
HBox box = new HBox ();
box.Spacing = 12;
Alignment imgBox = new Alignment (0, 0, 0, 0);
Image img = new Image (icon, lastImage != null ? Gtk.IconSize.Button : IconSize.Dialog);
imgBox.Add (img);
lastImage = img;
box.PackStart (imgBox, false, false, 0);
Label lab = new Label (msg);
lab.Xalign = 0;
lab.Yalign = 0;
lab.Wrap = true;
lab.WidthRequest = 500;
box.PackStart (lab, true, true, 0);
msgBox.PackStart (box, false, false, 0);
box.ShowAll ();
}
示例3: ListPage
public ListPage(Notebook notebook, ModulesTreeInfo module)
{
this.notebook = notebook;
this.module = module;
headerbox = new HBox();
headerlabel = new Label(module.Text);
headerbox.PackStart(headerlabel);
//Image img = new Image("gtk-close", IconSize.Menu);
close_img = ImageManager.GetImage("Images.close-button.png");
//close_img = new Image("gtk-close", IconSize.Menu);
btnCloseTab = new Button(close_img);
btnCloseTab.BorderWidth = 0;
btnCloseTab.Relief = ReliefStyle.None;
//btnCloseTab.WidthRequest = 19;
//btnCloseTab.HeightRequest = 19;
btnCloseTab.Clicked += delegate { this.Dispose(); };
headerbox.PackStart(btnCloseTab);
headerbox.ShowAll();
tableview = new DataTableView(module);
this.Add(tableview);
this.ShowAll();
notebook.AppendPage(this, headerbox);
notebook.SetTabReorderable(this, true);
}
示例4: BuildWidget
private void BuildWidget ()
{
HBox box = new HBox ();
disk_bar_align = new Alignment (0.5f, 0.5f, 1.0f, 1.0f);
disk_bar = new SegmentedBar ();
disk_bar.ValueFormatter = DapValueFormatter;
disk_bar.AddSegmentRgb (Catalog.GetString ("Audio"), 0, 0x3465a4);
disk_bar.AddSegmentRgb (Catalog.GetString ("Video"), 0, 0x73d216);
disk_bar.AddSegmentRgb (Catalog.GetString ("Other"), 0, 0xf57900);
disk_bar.AddSegment (Catalog.GetString ("Free Space"), 0, disk_bar.RemainderColor, false);
UpdateUsage ();
disk_bar_align.Add (disk_bar);
box.PackStart (disk_bar_align, true, true, 0);
disk_bar_align.TopPadding = 6;
Add (box);
box.ShowAll ();
SizeAllocated += delegate (object o, Gtk.SizeAllocatedArgs args) {
SetBackground ();
disk_bar.HorizontalPadding = (int)(args.Allocation.Width * 0.25);
};
}
示例5: WelcomePageBarButton
public WelcomePageBarButton (string title, string href, string iconResource = null)
{
FontFamily = Platform.IsMac ? Styles.WelcomeScreen.FontFamilyMac : Styles.WelcomeScreen.FontFamilyWindows;
HoverColor = Styles.WelcomeScreen.Links.HoverColor;
Color = Styles.WelcomeScreen.Links.Color;
FontSize = Styles.WelcomeScreen.Links.FontSize;
VisibleWindow = false;
this.Text = GettextCatalog.GetString (title);
this.actionLink = href;
if (!string.IsNullOrEmpty (iconResource)) {
imageHover = Gdk.Pixbuf.LoadFromResource (iconResource);
imageNormal = ImageService.MakeTransparent (imageHover, 0.7);
}
HBox box = new HBox ();
box.Spacing = Styles.WelcomeScreen.Links.IconTextSpacing;
image = new Image ();
label = new Label ();
box.PackStart (image, false, false, 0);
if (imageNormal == null)
image.NoShowAll = true;
box.PackStart (label, false, false, 0);
box.ShowAll ();
Add (box);
Update ();
Events |= (Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask | Gdk.EventMask.ButtonReleaseMask);
}
示例6: Graphics
// constructor that show the graphic interface to users
public Graphics(Game g)
: base(Gtk.WindowType.Toplevel)
{
Build ();
int scale = 10;
if (Screen.Height < 1000)
scale = 5;
this.game = g;
VBox gridWrapper = new VBox ();
HBox box = new HBox ();
this.status = new Label ("");
this.chooser = new Popup (this, this.game.getChooseableFigures(), handleChooser, scale);
this.mainGrid = new GridWidget (this.game, clickHandler, scale);
gridWrapper.PackStart (status, false, false, 0);
gridWrapper.PackStart (this.mainGrid, false, false, 0);
this.sidebarLeft = new SidebarWidget (g.getRemovedFigures (), "black", scale);
box.PackStart (new HBox ());
box.PackStart (this.sidebarLeft);
box.PackStart (gridWrapper, false, false, 0);
this.sidebarRight = new SidebarWidget (g.getRemovedFigures (), "white", scale);
box.PackEnd (this.sidebarRight);
box.PackStart (new HBox ());
box.ShowAll ();
this.Add (box);
updateGui (this.game.initialState ());
this.Show ();
}
示例7: Create
public static Gtk.Window Create ()
{
HBox options = new HBox (false, 0);
CheckButton check_button = null;
window = new ColorSelectionDialog ("Color selection dialog");
window.ColorSelection.HasOpacityControl = true;
window.ColorSelection.HasPalette = true;
window.SetDefaultSize (250, 200);
window.VBox.PackStart (options, false, false, 0);
window.VBox.BorderWidth = 10;
check_button = new CheckButton("Show Opacity");
check_button.Active = true;
options.PackStart (check_button, false, false, 0);
check_button.Toggled += new EventHandler (Opacity_Callback);
check_button = new CheckButton("Show Palette");
check_button.Active = true;
options.PackEnd (check_button, false, false, 0);
check_button.Toggled += new EventHandler (Palette_Callback);
window.ColorSelection.ColorChanged += new EventHandler (Color_Changed);
window.OkButton.Clicked += new EventHandler (Color_Selection_OK);
window.CancelButton.Clicked += new EventHandler (Color_Selection_Cancel);
options.ShowAll ();
return window;
}
示例8: AddMessage
public void AddMessage (string msg, IconId icon)
{
if (lastImage != null) {
HSeparator sep = new HSeparator ();
sep.Show ();
msgBox.PackStart (sep, false, false, 0);
lastImage.IconSize = Gtk.IconSize.Menu;
}
HBox box = new HBox ();
box.Spacing = 12;
Alignment imgBox = new Alignment (0, 0, 0, 0);
var img = new ImageView (icon, lastImage != null ? Gtk.IconSize.Menu : IconSize.Dialog);
imgBox.Add (img);
lastImage = img;
box.PackStart (imgBox, false, false, 0);
Label lab = new Label (msg);
lab.UseUnderline = false;
lab.Xalign = 0;
lab.Yalign = 0;
lab.Wrap = true;
lab.WidthRequest = 500;
box.PackStart (lab, true, true, 0);
msgBox.PackStart (box, false, false, 0);
box.ShowAll ();
}
示例9: BuildDialogUI
void BuildDialogUI()
{
// Add an HBox to the dialog's VBox.
HBox hbox = new HBox (false, 8);
hbox.BorderWidth = 8;
this.VBox.PackStart (hbox, false, false, 0);
// Add an Image widget to the HBox using a stock 'info' icon.
Image stock = new Image (Stock.DialogInfo, IconSize.Dialog);
hbox.PackStart (stock, false, false, 0);
// Here we are using a Table to contain the other widgets.
// Notice that the Table is added to the hBox.
Table table = new Table (2, 2, false);
table.RowSpacing = 4;
table.ColumnSpacing = 4;
hbox.PackStart (table, true, true, 0);
Label label = new Label ("_Username");
table.Attach (label, 0, 1, 0, 1);
table.Attach (usernameEntry, 1, 2, 0, 1);
label.MnemonicWidget = usernameEntry;
label = new Label ("_Password");
table.Attach (label, 0, 1, 1, 2);
table.Attach (passwordEntry , 1, 2, 1, 2);
label.MnemonicWidget = passwordEntry ;
hbox.ShowAll ();
// Add OK and Cancel Buttons.
this.AddButton(Stock.Ok, ResponseType.Ok);
this.AddButton(Stock.Cancel, ResponseType.Cancel);
}
示例10: InitializeExtraWidget
protected void InitializeExtraWidget()
{
PlaylistFormatDescription [] formats = PlaylistFileUtil.ExportFormats;
int default_export_index = PlaylistFileUtil.GetFormatIndex(formats, playlist);
// Build custom widget used to select the export format.
store = new ListStore(typeof(string), typeof(PlaylistFormatDescription));
foreach (PlaylistFormatDescription format in formats) {
store.AppendValues(format.FormatName, format);
}
HBox hBox = new HBox(false, 2);
combobox = new ComboBox(store);
CellRendererText crt = new CellRendererText();
combobox.PackStart(crt, true);
combobox.SetAttributes(crt, "text", 0);
combobox.Active = default_export_index;
combobox.Changed += OnComboBoxChange;
hBox.PackStart(new Label(Catalog.GetString("Select Format: ")), false, false, 0);
hBox.PackStart(combobox, true, true, 0);
combobox.ShowAll();
hBox.ShowAll();
ExtraWidget = hBox;
}
示例11: WidgetBuilderOptionPanelWidget
public WidgetBuilderOptionPanelWidget (Project project) : base (false, 6)
{
this.project = project as DotNetProject;
Gtk.HBox box = new Gtk.HBox (false, 3);
Gtk.Label lbl = new Gtk.Label (GettextCatalog.GetString ("Target Gtk# version:"));
box.PackStart (lbl, false, false, 0);
comboVersions = ComboBox.NewText ();
ReferenceManager refmgr = new ReferenceManager (project as DotNetProject);
foreach (string v in refmgr.SupportedGtkVersions)
comboVersions.AppendText (v);
comboVersions.Active = refmgr.SupportedGtkVersions.IndexOf (refmgr.GtkPackageVersion);
refmgr.Dispose ();
box.PackStart (comboVersions, false, false, 0);
box.ShowAll ();
PackStart (box, false, false, 0);
HSeparator sep = new HSeparator ();
sep.Show ();
PackStart (sep, false, false, 0);
if (!GtkDesignInfo.HasDesignedObjects (project))
return;
GtkDesignInfo designInfo = GtkDesignInfo.FromProject (project);
checkGettext = new CheckButton (GettextCatalog.GetString ("Enable gettext support"));
checkGettext.Active = designInfo.GenerateGettext;
checkGettext.Show ();
PackStart (checkGettext, false, false, 0);
box = new Gtk.HBox (false, 3);
box.PackStart (new Label (GettextCatalog.GetString ("Gettext class:")), false, false, 0);
entryGettext = new Gtk.Entry ();
entryGettext.Text = designInfo.GettextClass;
entryGettext.Sensitive = checkGettext.Active;
box.PackStart (entryGettext, false, false, 0);
box.ShowAll ();
PackStart (box, false, false, 0);
sep= new HSeparator ();
sep.Show ();
PackStart (sep, false, false, 0);
box = new Gtk.HBox (false, 3);
box.PackStart (new Label (GettextCatalog.GetString ("Stetic folder name :")), false, false, 0);
entryFolderName = new Gtk.Entry ();
entryFolderName.Text = designInfo.SteticFolderName;
entryFolderName.Sensitive = false;
box.PackStart (entryFolderName, false, false, 0);
box.ShowAll ();
PackStart (box, false, false, 0);
checkHideFiles = new CheckButton (GettextCatalog.GetString ("Hide designer files"));
checkHideFiles.Active = designInfo.HideGtkxFiles;
checkHideFiles.Show ();
PackStart (checkHideFiles, false, false, 0);
}
示例12: MiniButton
public MiniButton (string text, string icon): this ()
{
HBox box = new HBox (false, 3);
Image img = new Image (icon, IconSize.Menu);
box.PackStart (img, false, false, 0);
Label label = new Label (text);
label.Xalign = 0;
box.PackStart (label, true, true, 0);
box.ShowAll ();
Add (box);
}
示例13: WidgetBuilderOptionPanelWidget
public WidgetBuilderOptionPanelWidget (Project project) : base (false, 6)
{
this.project = project as DotNetProject;
Gtk.HBox box = new Gtk.HBox (false, 3);
Gtk.Label lbl = new Gtk.Label (GettextCatalog.GetString ("Target Gtk# version:"));
box.PackStart (lbl, false, false, 0);
comboVersions = ComboBox.NewText ();
ReferenceManager refmgr = new ReferenceManager (project as DotNetProject);
foreach (string v in refmgr.SupportedGtkVersions)
comboVersions.AppendText (v);
comboVersions.Active = refmgr.SupportedGtkVersions.IndexOf (refmgr.GtkPackageVersion);
refmgr.Dispose ();
box.PackStart (comboVersions, false, false, 0);
box.ShowAll ();
PackStart (box, false, false, 0);
HSeparator sep = new HSeparator ();
sep.Show ();
PackStart (sep, false, false, 0);
if (!GtkDesignInfo.HasDesignedObjects (project))
return;
GtkDesignInfo designInfo = GtkDesignInfo.FromProject (project);
checkGettext = new CheckButton (GettextCatalog.GetString ("Enable gettext support"));
checkGettext.Active = designInfo.GenerateGettext;
checkGettext.Show ();
PackStart (checkGettext, false, false, 0);
box = new Gtk.HBox (false, 3);
box.PackStart (new Label (GettextCatalog.GetString ("Gettext class:")), false, false, 0);
entryGettext = new Gtk.Entry ();
entryGettext.Text = designInfo.GettextClass;
entryGettext.Sensitive = checkGettext.Active;
box.PackStart (entryGettext, false, false, 0);
box.ShowAll ();
PackStart (box, false, false, 0);
box = new Gtk.HBox (false, 3);
box.PackStart (new Label (GettextCatalog.GetString ("Resource loader class:")), false, false, 0);
entryResourceLoader = new Gtk.Entry ();
entryResourceLoader.Text = designInfo.ImageResourceLoaderClass;
entryResourceLoader.Sensitive = checkGettext.Active;
box.PackStart (entryResourceLoader, false, false, 0);
box.ShowAll ();
PackStart (box, false, false, 0);
checkGettext.Clicked += delegate {
box.Sensitive = checkGettext.Active;
if (checkGettext.Active)
entryGettext.Text = "Mono.Unix.Catalog";
};
}
示例14: addPage
private void addPage (Widget widget, string label) {
HBox hBox = new HBox ();
hBox.Add(new Label (label));
Button button = new Button (new Image (Stock.Cancel, IconSize.Button ));
hBox.Add (button);
hBox.ShowAll();
notebook1.AppendPage (widget, new Label(label));
button.Clicked += delegate {
widget.Destroy ();
};
}
示例15: Main
public static void Main()
{
Gtk.Window window;
Gtk.VBox vbox;
Crumbs crumbs;
Application.Init ();
// Outer Window
window = new Gtk.Window ("Crumbs Test");
window.BorderWidth = 12;
window.Destroyed += OnDestroy;
// Main VBox
vbox = new Gtk.VBox ();
window.Add(vbox);
vbox.Show ();
// Crumbs widget
crumbs = new Crumbs ();
vbox.PackStart (crumbs, false, false, 0);
// Home Button
crumbs.Add (new Gtk.Image (Gtk.Stock.Home, Gtk.IconSize.Menu));
// Folder1
HBox hbox1 = new HBox ();
hbox1.Spacing = 3;
Gtk.Image img1 = new Gtk.Image (Stock.Directory, IconSize.Menu);
hbox1.PackStart (img1, false, true, 0);
hbox1.PackStart (new Label ("Documents"));
hbox1.ShowAll ();
crumbs.Add (hbox1);
// Folder2
HBox hbox2 = new HBox ();
hbox2.Spacing = 3;
Gtk.Image img2 = new Gtk.Image (Stock.Directory, IconSize.Menu);
hbox2.PackStart (img2, false, true, 0);
hbox2.PackStart (new Label ("Spreadsheets"));
hbox2.ShowAll ();
crumbs.Add (hbox2);
// Worksheet
crumbs.Add (new Label ("Worksheet"));
crumbs.ShowAll ();
window.Show ();
Application.Run ();
}