本文整理汇总了C#中Gtk.ScrolledWindow.Show方法的典型用法代码示例。如果您正苦于以下问题:C# ScrolledWindow.Show方法的具体用法?C# ScrolledWindow.Show怎么用?C# ScrolledWindow.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.ScrolledWindow
的用法示例。
在下文中一共展示了ScrolledWindow.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClockThemeSelector
public ClockThemeSelector (ClockDockItem dockItem)
{
DockItem = dockItem;
SkipTaskbarHint = true;
TypeHint = Gdk.WindowTypeHint.Dialog;
WindowPosition = Gtk.WindowPosition.Center;
KeepAbove = true;
Stick ();
Title = Catalog.GetString ("Themes");
IconName = Gtk.Stock.Preferences;
AddButton (Stock.Close, ResponseType.Close);
labelTreeView.Model = labelTreeStore;
labelTreeView.HeadersVisible = false;
labelTreeView.Selection.Changed += OnLabelSelectionChanged;
labelTreeView.AppendColumn (Catalog.GetString ("Theme"), new CellRendererText (), "text", 0);
ScrolledWindow win = new ScrolledWindow ();
win.Add (labelTreeView);
win.SetSizeRequest (200, 300);
win.Show ();
VBox.PackEnd (win);
VBox.ShowAll ();
UpdateThemeList ();
}
示例2: AddScrolledWindow
public static ScrolledWindow AddScrolledWindow(Widget widget)
{
ScrolledWindow swindow = new ScrolledWindow();
swindow.Add(widget);
swindow.Show();
return swindow;
}
示例3: MultiChooserDialog
public MultiChooserDialog(IList options, IList banned)
{
base.Modal = true;
base.HeightRequest = 400;
base.WidthRequest = 250;
//TODO: i18n
base.Title = GettextCatalog.GetString ("Choose elements");
base.AddButton(GettextCatalog.GetString ("_Cancel"), Gtk.ResponseType.Cancel);
base.AddButton(GettextCatalog.GetString ("_Accept"), Gtk.ResponseType.Accept);
base.Response += new Gtk.ResponseHandler(OnResponse);
TreeView treeView = new TreeView();
treeView.HeadersVisible = false;
_store = new ListStore(typeof(bool), typeof(string));
treeView.Model = _store;
CellRendererToggle crtgl = new CellRendererToggle();
crtgl.Activatable = true;
crtgl.Toggled += new ToggledHandler(CheckboxToggledHandler);
TreeViewColumn column = new TreeViewColumn ();
column.PackStart(crtgl, false);
column.AddAttribute(crtgl, "active", 0);
treeView.AppendColumn(column);
CellRendererText crtxt = new CellRendererText ();
column = new TreeViewColumn ();
column.PackStart(crtxt, false);
column.AddAttribute(crtxt, "text", 1);
treeView.AppendColumn(column);
Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
sw.ShadowType = Gtk.ShadowType.In;
sw.Add(treeView);
treeView.Show();
base.VBox.Add(sw);
ShowList(options, banned);
sw.Show();
}
示例4: TableViewBackend
public TableViewBackend()
{
var sw = new Gtk.ScrolledWindow ();
sw.ShadowType = Gtk.ShadowType.In;
sw.Child = new CustomTreeView (this);
sw.Child.Show ();
sw.Show ();
base.Widget = sw;
}
示例5: WelcomePageView
public WelcomePageView () : base ()
{
this.ContentName = GettextCatalog.GetString ("Welcome");
this.IsViewOnly = true;
scroller = new ScrolledWindow ();
widget = new WelcomePageWidget ();
scroller.AddWithViewport (widget);
scroller.ShadowType = ShadowType.None;
scroller.FocusChain = new Widget[] { widget };
scroller.Show ();
}
示例6: ScrolledView
public ScrolledView()
: base()
{
ScrolledWindow = new ScrolledWindow (null, null);
this.Put (ScrolledWindow, 0, 0);
ScrolledWindow.Show ();
//ebox = new BlendBox ();
ControlBox = new EventBox ();
this.Put (ControlBox, 0, 0);
ControlBox.ShowAll ();
hide = new DelayedOperation (2000, new GLib.IdleHandler (HideControls));
this.Destroyed += HandleDestroyed;
}
示例7: ScrolledView
public ScrolledView()
: base()
{
scroll = new ScrolledWindow (null, null);
this.Put (scroll, 0, 0);
scroll.Show ();
//ebox = new BlendBox ();
ebox = new EventBox ();
this.Put (ebox, 0, 0);
ebox.ShowAll ();
hide = new Delay (2000, new GLib.IdleHandler (HideControls));
this.Destroyed += HandleDestroyed;
}
示例8: ScriptEditor
public ScriptEditor(object @object, PropertyInfo info) : base(@object, info) {
VBox box = new VBox(false, 3);
ScrolledWindow window = new ScrolledWindow();
this.mEditor = new TextView();
this.mEditor.Show();
this.mEditor.Buffer.Changed += this.OnEditorChanged;
this.mEditor.ModifyFont(Pango.FontDescription.FromString("monospace"));
this.mErrorTag = new TextTag("compile error");
this.mErrorTag.Underline = Pango.Underline.Error;
this.mEditor.Buffer.TagTable.Add(this.mErrorTag);
window.Add(this.mEditor);
window.Show();
window.ShadowType = ShadowType.In;
this.mErrorLabel = new Label();
this.mErrorLabel.Selectable = true;
this.mErrorLabel.LineWrap = true;
this.mErrorLabel.Xalign = 0;
this.mErrorLabel.Style.FontDescription.Weight = Pango.Weight.Bold;
this.mErrorLabel.ModifyFont(this.mErrorLabel.Style.FontDescription);
box.Add(window);
box.Add(this.mErrorLabel);
box.Show();
box.SizeAllocated += this.OnBoxSizeAllocated;
this.SetSizeRequest(1, -1);
this.Add(box);
this.Revert();
}
示例9: NoteRecentChanges
protected NoteRecentChanges (NoteManager manager)
: base (Catalog.GetString ("Search All Notes"))
{
this.manager = manager;
this.IconName = "tomboy";
this.DefaultWidth = 450;
this.DefaultHeight = 400;
this.current_matches = new Dictionary<string, int> ();
this.Resizable = true;
selected_tags = new Dictionary<Tag, Tag> ();
AddAccelGroup (Tomboy.ActionManager.UI.AccelGroup);
menu_bar = CreateMenuBar ();
Gtk.Label label = new Gtk.Label (Catalog.GetString ("_Search:"));
label.Xalign = 0.0f;
find_combo = Gtk.ComboBoxEntry.NewText ();
label.MnemonicWidget = find_combo;
find_combo.Changed += OnEntryChanged;
find_combo.Entry.ActivatesDefault = false;
find_combo.Entry.Activated += OnEntryActivated;
find_combo.Entry.FocusInEvent += OnEntryFocusIn;
if (previous_searches != null) {
foreach (string prev in previous_searches) {
find_combo.AppendText (prev);
}
}
clear_search_button = new Gtk.Button (new Gtk.Image (Gtk.Stock.Clear,
Gtk.IconSize.Menu));
clear_search_button.Sensitive = false;
clear_search_button.Clicked += ClearSearchClicked;
clear_search_button.Show ();
Gtk.Table table = new Gtk.Table (1, 3, false);
table.Attach (label, 0, 1, 0, 1,
Gtk.AttachOptions.Fill,
Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
0, 0);
table.Attach (find_combo, 1, 2, 0, 1,
Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
0, 0);
table.Attach (clear_search_button,
2, 3, 0, 1,
Gtk.AttachOptions.Fill,
Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
0, 0);
table.ColumnSpacing = 4;
table.ShowAll ();
Gtk.HBox hbox = new Gtk.HBox (false, 0);
hbox.PackStart (table, true, true, 0);
hbox.ShowAll ();
// Notebooks Pane
Gtk.Widget notebooksPane = MakeNotebooksPane ();
notebooksPane.Show ();
MakeRecentTree ();
tree.Show ();
status_bar = new Gtk.Statusbar ();
status_bar.HasResizeGrip = true;
status_bar.Show ();
// Update on changes to notes
manager.NoteDeleted += OnNotesDeleted;
manager.NoteAdded += OnNotesChanged;
manager.NoteRenamed += OnNoteRenamed;
manager.NoteSaved += OnNoteSaved;
// List all the current notes
UpdateResults ();
matches_window = new Gtk.ScrolledWindow ();
matches_window.ShadowType = Gtk.ShadowType.In;
matches_window.HscrollbarPolicy = Gtk.PolicyType.Automatic;
matches_window.VscrollbarPolicy = Gtk.PolicyType.Automatic;
matches_window.Add (tree);
matches_window.Show ();
hpaned = new Gtk.HPaned ();
hpaned.Position = 150;
hpaned.Add1 (notebooksPane);
hpaned.Add2 (matches_window);
hpaned.Show ();
RestorePosition ();
Gtk.VBox vbox = new Gtk.VBox (false, 8);
vbox.BorderWidth = 6;
vbox.PackStart (hbox, false, false, 4);
vbox.PackStart (hpaned, true, true, 0);
vbox.PackStart (status_bar, false, false, 0);
vbox.Show ();
//.........这里部分代码省略.........
示例10: CreateExceptionValueTreeView
Widget CreateExceptionValueTreeView ()
{
ExceptionValueTreeView = new ObjectValueTreeView ();
ExceptionValueTreeView.Frame = DebuggingService.CurrentFrame;
ExceptionValueTreeView.ModifyBase (StateType.Normal, new Gdk.Color (223, 228, 235));
ExceptionValueTreeView.AllowExpanding = true;
ExceptionValueTreeView.AllowPinning = false;
ExceptionValueTreeView.AllowEditing = false;
ExceptionValueTreeView.AllowAdding = false;
ExceptionValueTreeView.RulesHint = false;
ExceptionValueTreeView.Show ();
var scrolled = new ScrolledWindow () { HeightRequest = 128 };
scrolled.ShadowType = ShadowType.None;
scrolled.Add (ExceptionValueTreeView);
scrolled.Show ();
return scrolled;
}
示例11: CreateStackTraceTreeView
Widget CreateStackTraceTreeView ()
{
var store = new ListStore (typeof (ExceptionStackFrame), typeof (string), typeof (bool));
StackTraceTreeView = new TreeView (store);
StackTraceTreeView.SearchColumn = -1; // disable the interactive search
StackTraceTreeView.FixedHeightMode = false;
StackTraceTreeView.HeadersVisible = false;
StackTraceTreeView.ShowExpanders = false;
StackTraceTreeView.RulesHint = false;
StackTraceTreeView.Show ();
var renderer = new StackFrameCellRenderer (StackTraceTreeView.PangoContext);
StackTraceTreeView.AppendColumn ("", renderer, (CellLayoutDataFunc)StackFrameLayout);
StackTraceTreeView.RowActivated += StackFrameActivated;
var scrolled = new ScrolledWindow {
HeightRequest = 180,
HscrollbarPolicy = PolicyType.Never,
VscrollbarPolicy = PolicyType.Automatic
};
scrolled.ShadowType = ShadowType.None;
scrolled.Add (StackTraceTreeView);
scrolled.Show ();
var vbox = new VBox ();
vbox.PackStart (CreateSeparator (), false, true, 0);
vbox.PackStart (scrolled, true, true, 0);
vbox.Show ();
var vbox2 = new VBox ();
expanderStacktrace = WrapInExpander (GettextCatalog.GetString ("Stacktrace"), vbox);
vbox2.PackStart (new VBox (), false, false, 5);
vbox2.PackStart (expanderStacktrace, true, true, 0);
vbox2.ShowAll ();
return vbox2;
}
示例12: CreateStackTraceTreeView
Widget CreateStackTraceTreeView ()
{
var store = new ListStore (typeof (ExceptionStackFrame), typeof (string), typeof (bool));
StackTraceTreeView = new TreeView (store);
StackTraceTreeView.FixedHeightMode = false;
StackTraceTreeView.HeadersVisible = false;
StackTraceTreeView.ShowExpanders = false;
StackTraceTreeView.RulesHint = true;
StackTraceTreeView.Show ();
var renderer = new StackFrameCellRenderer (StackTraceTreeView.PangoContext);
renderer.Width = DefaultWidth;
StackTraceTreeView.AppendColumn ("", renderer, (CellLayoutDataFunc) StackFrameLayout);
StackTraceTreeView.SizeAllocated += (o, args) => renderer.Width = args.Allocation.Width;
StackTraceTreeView.RowActivated += StackFrameActivated;
var scrolled = new ScrolledWindow { HeightRequest = 180, HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic };
scrolled.ShadowType = ShadowType.None;
scrolled.Add (StackTraceTreeView);
scrolled.Show ();
return scrolled;
}
示例13: SyncDialog
// TODO: Possible to make Tomboy not crash if quit while dialog is up?
public SyncDialog ()
: base (string.Empty,
null,
Gtk.DialogFlags.DestroyWithParent)
{
progressBarTimeoutId = 0;
SetSizeRequest (400, -1);
HasSeparator = false;
// Outer box. Surrounds all of our content.
VBox outerVBox = new VBox (false, 12);
outerVBox.BorderWidth = 6;
outerVBox.Show ();
VBox.PackStart (outerVBox, true, true, 0);
// Top image and label
HBox hbox = new HBox (false, 12);
hbox.Show ();
outerVBox.PackStart (hbox, false, false, 0);
image = new Image (GuiUtils.GetIcon ("tomboy", 48));
image.Xalign = 0;
image.Yalign = 0;
image.Show ();
hbox.PackStart (image, false, false, 0);
// Label header and message
VBox vbox = new VBox (false, 6);
vbox.Show ();
hbox.PackStart (vbox, true, true, 0);
headerLabel = new Label ();
headerLabel.UseMarkup = true;
headerLabel.Xalign = 0;
headerLabel.UseUnderline = false;
headerLabel.LineWrap = true;
headerLabel.Show ();
vbox.PackStart (headerLabel, false, false, 0);
messageLabel = new Label ();
messageLabel.Xalign = 0;
messageLabel.UseUnderline = false;
messageLabel.LineWrap = true;
messageLabel.SetSizeRequest (250, -1);
messageLabel.Show ();
vbox.PackStart (messageLabel, false, false, 0);
progressBar = new Gtk.ProgressBar ();
progressBar.Orientation = Gtk.ProgressBarOrientation.LeftToRight;
progressBar.BarStyle = ProgressBarStyle.Continuous;
progressBar.ActivityBlocks = 30;
progressBar.Show ();
outerVBox.PackStart (progressBar, false, false, 0);
progressLabel = new Label ();
progressLabel.UseMarkup = true;
progressLabel.Xalign = 0;
progressLabel.UseUnderline = false;
progressLabel.LineWrap = true;
progressLabel.Wrap = true;
progressLabel.Show ();
outerVBox.PackStart (progressLabel, false, false, 0);
// Expander containing TreeView
expander = new Gtk.Expander (Catalog.GetString ("Details"));
expander.Spacing = 6;
expander.Activated += OnExpanderActivated;
expander.Show ();
outerVBox.PackStart (expander, true, true, 0);
// Contents of expander
Gtk.VBox expandVBox = new Gtk.VBox ();
expandVBox.Show ();
expander.Add (expandVBox);
// Scrolled window around TreeView
Gtk.ScrolledWindow scrolledWindow = new Gtk.ScrolledWindow ();
scrolledWindow.ShadowType = Gtk.ShadowType.In;
scrolledWindow.SetSizeRequest (-1, 200);
scrolledWindow.Show ();
expandVBox.PackStart (scrolledWindow, true, true, 0);
// Create model for TreeView
model = new Gtk.TreeStore (typeof (string), typeof (string));
// Create TreeView, attach model
Gtk.TreeView treeView = new Gtk.TreeView ();
treeView.Model = model;
treeView.RowActivated += OnRowActivated;
treeView.Show ();
scrolledWindow.Add (treeView);
// Set up TreeViewColumns
Gtk.TreeViewColumn column = new Gtk.TreeViewColumn (
Catalog.GetString ("Note Title"),
new Gtk.CellRendererText (), "text", 0);
column.SortColumnId = 0;
column.Resizable = true;
//.........这里部分代码省略.........
示例14: WelcomePageWidget
public WelcomePageWidget ()
{
ShowScrollbars = true;
VisibleWindow = false;
BackgroundColor = "white";
LogoHeight = 90;
var background = new WelcomePageWidgetBackground ();
Background = background;
background.Owner = this;
var mainAlignment = new Gtk.Alignment (0f, 0f, 1f, 1f);
background.Add (mainAlignment);
BuildContent (mainAlignment);
if (ShowScrollbars) {
var scroller = new ScrolledWindow ();
scroller.AddWithViewport (background);
((Gtk.Viewport)scroller.Child).ShadowType = ShadowType.None;
scroller.ShadowType = ShadowType.None;
scroller.FocusChain = new Widget[] { background };
scroller.Show ();
Add (scroller);
} else
this.Add (background);
if (LogoImage != null) {
var logoHeight = LogoHeight;
mainAlignment.SetPadding ((uint)(logoHeight + Styles.WelcomeScreen.Spacing), 0, (uint)Styles.WelcomeScreen.Spacing, 0);
}
ShowAll ();
IdeApp.Workbench.GuiLocked += OnLock;
IdeApp.Workbench.GuiUnlocked += OnUnlock;
}
示例15: BuildLayout
void BuildLayout ()
{
primary_vbox = new VBox ();
var shell = action_manager.UIManager.GetWidget ("/MainMenu");
primary_vbox.PackStart (shell, false, false, 0);
photo_view = new PhotoGridView ();
photo_view.Show ();
var photo_view_scrolled = new ScrolledWindow ();
photo_view_scrolled.Add (photo_view);
photo_view_scrolled.Show ();
primary_vbox.PackStart (photo_view_scrolled, true, true, 8);
var model = PhotoModelFactory.GetModel (Core.MainPhotoSourceCache.AllPhotos);
model.Reload ();
Hyena.Log.DebugFormat ("Model count: {0}", model.Count);
photo_view.SetModel (model);
var hbox = new HBox (false, 5);
hbox.Add (new Label ("Size"));
var scale = new HScale (50, 800, 10);
scale.Value = 140;
scale.ValueChanged += (s, a) => {
photo_view.ThumbnailSize = (int) scale.Value;
};
hbox.Add (scale);
hbox.ShowAll ();
primary_vbox.PackEnd (hbox, false, true, 0);
primary_vbox.Show ();
Add (primary_vbox);
}