本文整理汇总了C#中Gtk.ScrolledWindow.Add方法的典型用法代码示例。如果您正苦于以下问题:C# ScrolledWindow.Add方法的具体用法?C# ScrolledWindow.Add怎么用?C# ScrolledWindow.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.ScrolledWindow
的用法示例。
在下文中一共展示了ScrolledWindow.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseTraceWindow
public ParseTraceWindow(RuntimeThread runtimeThread) : base("Parse Trace")
{
runtimeThread.Runtime.ParseTrace.EnterEvent += OnEnter;
runtimeThread.Runtime.ParseTrace.LeaveEvent += OnLeave;
SetDefaultSize(250, 300);
SkipPagerHint = true;
SkipTaskbarHint = true;
scroller = new ScrolledWindow();
scroller.BorderWidth = 5;
scroller.ShadowType = ShadowType.In;
Add(scroller);
store = new TreeStore(typeof(string), typeof(Source), typeof(GtkProofBox));
view = new TreeView(store);
column = view.AppendColumn(null, new CellRendererText(), "text", VALUE_TEXT);
view.HeadersVisible = false;
view.RowActivated += OnTreeRowActivated;
scroller.Add(view);
GLib.Timeout.Add(50, OnUpdatesTimeout);
// TODO need a context menu for view source and follow link
}
示例2: HelpTree
public HelpTree () : base (GettextCatalog.GetString ("Help"), Gtk.Stock.Help)
{
tree_view = new MonoDevelop.Ide.Gui.Components.PadTreeView ();
tree_view.AppendColumn ("name_col", tree_view.TextRenderer, "text", 0);
tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded);
tree_view.Selection.Changed += new EventHandler (RowActivated);
store = new TreeStore (typeof (string), typeof (Node));
tree_view.Model = store;
tree_view.HeadersVisible = false;
scroller = new MonoDevelop.Components.CompactScrolledWindow ();
scroller.ShadowType = Gtk.ShadowType.None;
scroller.Add (tree_view);
if (HelpService.HelpTree != null) {
root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), HelpService.HelpTree);
PopulateNode (root_iter);
tree_view.ExpandRow (new TreePath ("0"), false);
TreeIter child_iter;
start:
if (store.IterChildren (out child_iter, root_iter)) {
do {
if (!store.IterHasChild (child_iter)) {
store.Remove (ref child_iter);
goto start;
}
} while (store.IterNext (ref child_iter));
}
}
Control.ShowAll ();
}
示例3: Theatre
// create the main theatre widget
public Theatre()
{
video_widget = new VideoWidget (true);
video_widget_fullscreen = new VideoWidget (false);
fullscreen = new Fullscreen (video_widget_fullscreen);
media_tree = new TreeView (media_store);
media_tree.AppendColumn (null, new CellRendererText (), new TreeCellDataFunc (renderMedia));
media_tree.HeadersVisible = false;
ScrolledWindow scrolled_tree = new ScrolledWindow ();
scrolled_tree.Add (media_tree);
scrolled_tree.ShadowType = ShadowType.In;
main_splitter.Add1 (scrolled_tree);
main_splitter.Add2 (video_widget);
media_tree.RowActivated += tree_activated;
video_widget.ButtonPressEvent += video_button_press;
video_widget_fullscreen.ButtonPressEvent += video_button_press;
video_widget.ButtonReleaseEvent += video_button_release;
video_widget_fullscreen.ButtonReleaseEvent += video_button_release;
Global.Core.Fuse.MediaControls.MediaEngine.FoundVideoInfo += found_video_info;
}
示例4: DemoTreeStore
public DemoTreeStore () : base ("Card planning sheet")
{
VBox vbox = new VBox (false, 8);
vbox.BorderWidth = 8;
Add (vbox);
vbox.PackStart (new Label ("Jonathan's Holiday Card Planning Sheet"),
false, false, 0);
ScrolledWindow sw = new ScrolledWindow ();
sw.ShadowType = ShadowType.EtchedIn;
sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
vbox.PackStart (sw, true, true, 0);
// create model
CreateModel ();
// create tree view
TreeView treeView = new TreeView (store);
treeView.RulesHint = true;
treeView.Selection.Mode = SelectionMode.Multiple;
AddColumns (treeView);
sw.Add (treeView);
// expand all rows after the treeview widget has been realized
treeView.Realized += new EventHandler (ExpandRows);
SetDefaultSize (650, 400);
ShowAll ();
}
示例5: Main20
public static void Main20 (string[] args)
{
Application.Init ();
PopulateStore ();
Window win = new Window ("TreeView demo");
win.DeleteEvent += new DeleteEventHandler (DeleteCB);
win.DefaultWidth = 320;
win.DefaultHeight = 480;
ScrolledWindow sw = new ScrolledWindow ();
win.Add (sw);
TreeView tv = new TreeView (store);
tv.HeadersVisible = true;
tv.AppendColumn ("One", new CellRendererText (), new TreeCellDataFunc (CellDataA));
tv.AppendColumn ("Two", new CellRendererText (), new TreeCellDataFunc (CellDataB));
sw.Add (tv);
win.ShowAll ();
Application.Run ();
}
示例6: Main
public static void Main()
{
BusG.Init ();
Application.Init ();
tv = new TextView ();
ScrolledWindow sw = new ScrolledWindow ();
sw.Add (tv);
Button btn = new Button ("Click me");
btn.Clicked += OnClick;
Button btnq = new Button ("Click me (thread)");
btnq.Clicked += OnClickQuit;
VBox vb = new VBox (false, 2);
vb.PackStart (sw, true, true, 0);
vb.PackStart (btn, false, true, 0);
vb.PackStart (btnq, 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.GetObject<IBus> ("org.freedesktop.DBus", new ObjectPath ("/org/freedesktop/DBus"));
Application.Run ();
}
示例7: GrammarWindow
public GrammarWindow(RuntimeThread runtimeThread) : base("Grammar")
{
runtimeThread.Runtime.Grammar.Trace.PatternDefinedEvent += OnGrammarPatternDefined;
runtimeThread.Runtime.Grammar.Trace.PatternChangedEvent += OnGrammarPatternChanged;
SetDefaultSize(250, 300);
SkipPagerHint = true;
SkipTaskbarHint = true;
scroller = new ScrolledWindow();
scroller.BorderWidth = 5;
scroller.ShadowType = ShadowType.In;
Add(scroller);
store = new TreeStore(typeof(string), typeof(Source));
// FIXME - only want to sort top level
//TreeModelSort storeSort = new TreeModelSort(store);
//storeSort.SetSortColumnId(0, SortType.Ascending);
view = new TreeView(store);
view.AppendColumn(null, new CellRendererText(), "text", VALUE_TEXT);
view.HeadersVisible = false;
view.RowActivated += OnTreeRowActivated;
view.ButtonPressEvent += OnTreeButtonPress;
scroller.Add(view);
MenuBuilder menuBuilder = new MenuBuilder();
menu = menuBuilder.StartMenu();
menuBuilder.Add("Show source", OnMenuShowSource);
menuBuilder.Add("Show object", OnMenuShowObject);
menu.ShowAll();
}
示例8: StatusLogPage
private StatusLogPage()
{
m_TextView = new TextView();
m_TextView.Editable = false;
ScrolledWindow swindow = new ScrolledWindow();
swindow.Add(m_TextView);
this.PackStart(swindow, true, true, 0);
swindow.ShowAll();
var tag = new TextTag("Error");
tag.Foreground = "darkred";
m_TextView.Buffer.TagTable.Add(tag);
tag = new TextTag("Fatal");
tag.Foreground = "darkred";
m_TextView.Buffer.TagTable.Add(tag);
tag = new TextTag("Warn");
tag.Foreground = "darkorange";
m_TextView.Buffer.TagTable.Add(tag);
tag = new TextTag("Info");
tag.Foreground = "darkgreen";
m_TextView.Buffer.TagTable.Add(tag);
tag = new TextTag("Debug");
tag.Foreground = "darkblue";
m_TextView.Buffer.TagTable.Add(tag);
m_TextView.Buffer.CreateMark("end", m_TextView.Buffer.EndIter, false);
LoggingService.AddLogger(this);
}
示例9: ViewNameIcon
public ViewNameIcon() : base()
{
upbutton = new Button();
upbutton.Add( new Image(Stock.GoUp, IconSize.Button) );
upbutton.Clicked += OnUpClicked;
downbutton = new Button();
downbutton.Add( new Image(Stock.GoDown, IconSize.Button) );
downbutton.Clicked += OnDownClicked;
swindow = new ScrolledWindow();
view = new IconView();
CellRendererPixbuf cellicon= new CellRendererPixbuf();
CellRendererText celltext = new CellRendererText();
celltext.Xalign=0.5f;
view.PackStart(cellicon, false);
view.SetCellDataFunc(cellicon, CellRenderFunctions.RenderIcon);
view.PackStart(celltext, false);
view.SetCellDataFunc(celltext, CellRenderFunctions.RenderName);
view.SelectionMode = Gtk.SelectionMode.Browse;
view.SelectionChanged += OnSelectionChanged;
view.ItemActivated += OnRowActivated;
swindow.Add(view);
swindow.HscrollbarPolicy = PolicyType.Never;
swindow.VscrollbarPolicy = PolicyType.Automatic;
this.PackStart(upbutton, false, false, 0);
this.PackStart(swindow, true, true, 0);
this.PackStart(downbutton, false, false, 0);
store = new StoreBase();
view.Model=store.ViewModel;
ShowAll();
}
示例10: HelpTree
public HelpTree()
: base(GettextCatalog.GetString ("Help"), Gtk.Stock.Help)
{
tree_view = new TreeView ();
tree_view.AppendColumn ("name_col", new CellRendererText (), "text", 0);
tree_view.RowExpanded += new Gtk.RowExpandedHandler (RowExpanded);
tree_view.Selection.Changed += new EventHandler (RowActivated);
store = new TreeStore (typeof (string), typeof (Node));
root_iter = store.AppendValues (GettextCatalog.GetString ("Mono Documentation"), Runtime.Documentation.HelpTree);
PopulateNode (root_iter);
tree_view.Model = store;
tree_view.HeadersVisible = false;
scroller = new ScrolledWindow ();
scroller.ShadowType = Gtk.ShadowType.In;
scroller.Add (tree_view);
tree_view.ExpandRow (new TreePath ("0"), false);
TreeIter child_iter;
start:
store.IterChildren (out child_iter, root_iter);
do {
if (!store.IterHasChild (child_iter)) {
store.Remove (ref child_iter);
goto start;
}
} while (store.IterNext (ref child_iter));
Control.ShowAll ();
}
示例11: ObjectWindow
public ObjectWindow(RuntimeThread runtimeThread, object root)
: base(GetTitle(root))
{
SetDefaultSize(250, 300);
SkipPagerHint = true;
SkipTaskbarHint = true;
scroller = new ScrolledWindow();
scroller.BorderWidth = 5;
scroller.ShadowType = ShadowType.In;
Add(scroller);
store = new TreeStore(typeof(string), typeof(object), typeof(bool));
//TreeModelSort storeSort = new TreeModelSort(store);
//storeSort.SetSortColumnId(0, SortType.Ascending);
view = new TreeView(store);
view.AppendColumn(null, new CellRendererText(), "text", VALUE_TEXT);
view.HeadersVisible = false;
view.RowExpanded += OnTreeRowExpanded;
view.RowCollapsed += OnTreeRowCollapsed;
scroller.Add(view);
Add(false, new TreeIter(), "", root, false, false);
TreeIter first;
store.GetIterFirst(out first);
view.ExpandRow(store.GetPath(first), false);
}
示例12: 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 ();
}
示例13: AddScrolledWindow
public static ScrolledWindow AddScrolledWindow(Widget widget)
{
ScrolledWindow swindow = new ScrolledWindow();
swindow.Add(widget);
swindow.Show();
return swindow;
}
示例14: GacReferencePanel
public GacReferencePanel(SelectReferenceDialog selectDialog)
{
this.selectDialog = selectDialog;
store = new TreeStore (typeof (string), typeof (string), typeof(string), typeof(bool), typeof(string));
treeView = new TreeView (store);
TreeViewColumn firstColumn = new TreeViewColumn ();
firstColumn.Title = GettextCatalog.GetString ("Reference Name");
CellRendererToggle tog_render = new CellRendererToggle ();
tog_render.Toggled += new Gtk.ToggledHandler (AddReference);
firstColumn.PackStart (tog_render, false);
firstColumn.AddAttribute (tog_render, "active", 3);
CellRendererText text_render = new CellRendererText ();
firstColumn.PackStart (text_render, true);
firstColumn.AddAttribute (text_render, "text", 0);
treeView.AppendColumn (firstColumn);
treeView.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "text", 1);
// FIXME: this seems useless
//treeView.AppendColumn (GettextCatalog.GetString ("Path"), new CellRendererText (), "text", 2);
store.SetSortColumnId (0, SortType.Ascending);
store.SetSortFunc (0, new TreeIterCompareFunc (SortTree));
PrintCache();
ScrolledWindow sc = new ScrolledWindow ();
sc.ShadowType = Gtk.ShadowType.In;
sc.Add (treeView);
this.PackStart (sc, true, true, 0);
ShowAll ();
BorderWidth = 6;
}
示例15: 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();
}