本文整理汇总了C#中Gtk.ScrolledWindow类的典型用法代码示例。如果您正苦于以下问题:C# ScrolledWindow类的具体用法?C# ScrolledWindow怎么用?C# ScrolledWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ScrolledWindow类属于Gtk命名空间,在下文中一共展示了ScrolledWindow类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: 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);
}
开发者ID:KevinKelley,项目名称:katahdin,代码行数:30,代码来源:ObjectWindow.cs
示例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 ();
}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:34,代码来源:MonodocTreePad.cs
示例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;
}
开发者ID:gsterjov,项目名称:fusemc,代码行数:29,代码来源:Theatre.cs
示例4: 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
示例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 ();
}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:25,代码来源:ManagedTreeViewDemo.cs
示例6: 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();
}
开发者ID:KevinKelley,项目名称:katahdin,代码行数:35,代码来源:GrammarWindow.cs
示例7: 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 ();
}
开发者ID:arkydon,项目名称:gtk-sharp,代码行数:31,代码来源:DemoTreeStore.cs
示例8: initGui
private void initGui()
{
//create the layout
VBox layout = new VBox();
//add the list
ScrolledWindow sw = new ScrolledWindow();
sw.AddWithViewport( list );
layout.PackStart ( sw );
//add the add/edit/remove buttons
HBox hbox = new HBox();
hbox.PackStart ( BtnAdd );
hbox.PackStart ( BtnEdit );
hbox.PackStart ( BtnRemove );
hbox.PackStart ( BtnSort );
layout.PackStart( hbox, false, true, 0 );
//add the checkboxes
hbox = new HBox();
hbox.PackStart( ChkOwnerDrawned , true, true, 0 );
hbox.PackStart( ChkIsCheckBoxList, true, true, 0 );
hbox.PackStart( ChkIsEditable , true, true, 0 );
hbox.PackStart( ChkDragAndDrop , true, true, 0 );
//
layout.PackStart( hbox, false, true, 0 );
//add layout
this.Add( layout );
}
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:27,代码来源:SimpleList.cs
示例9: EntityListView
public EntityListView()
{
SizeRequested += delegate(object o, SizeRequestedArgs args) {
if (Child != null)
args.Requisition = Child.SizeRequest ();
};
SizeAllocated += delegate(object o, SizeAllocatedArgs args) {
if (Child != null)
Child.Allocation = args.Allocation;
};
VBox vBox = new VBox();
ScrolledWindow scrolledWindow = new ScrolledWindow();
scrolledWindow.ShadowType = ShadowType.In;
treeView = new TreeView();
scrolledWindow.Add (treeView);
vBox.Add (scrolledWindow);
Add (vBox);
ShowAll ();
actionGroup = new ActionGroup("entityListView");
}
开发者ID:ruben206,项目名称:ad,代码行数:25,代码来源:EntityListView.cs
示例10: DemoTextView
public DemoTextView () : base ("TextView")
{
SetDefaultSize (450,450);
BorderWidth = 0;
VPaned vpaned = new VPaned ();
vpaned.BorderWidth = 5;
Add (vpaned);
// For convenience, we just use the autocreated buffer from
// the first text view; you could also create the buffer
// by itself, then later create a view widget.
view1 = new TextView ();
TextBuffer buffer = view1.Buffer;
view2 = new TextView (buffer);
ScrolledWindow sw = new ScrolledWindow ();
sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
vpaned.Add1 (sw);
sw.Add (view1);
sw = new ScrolledWindow ();
sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
vpaned.Add2 (sw);
sw.Add (view2);
CreateTags (buffer);
InsertText (buffer);
AttachWidgets (view1);
AttachWidgets (view2);
ShowAll ();
}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:34,代码来源:DemoTextView.cs
示例11: DemoListStore
public DemoListStore () : base ("ListStore Demo")
{
BorderWidth = 8;
VBox vbox = new VBox (false, 8);
Add (vbox);
Label label = new Label ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
vbox.PackStart (label, 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
store = CreateModel ();
// create tree view
TreeView treeView = new TreeView (store);
treeView.RulesHint = true;
treeView.SearchColumn = (int) Column.Description;
sw.Add (treeView);
AddColumns (treeView);
// finish & show
SetDefaultSize (280, 250);
ShowAll ();
}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:30,代码来源:DemoListStore.cs
示例12: BuildView
private void BuildView ()
{
VBox box = new VBox ();
Add (box);
ScrolledWindow sw = new ScrolledWindow ();
sw.HscrollbarPolicy = PolicyType.Never;
TreeView view = new TreeView ();
view.RowActivated += delegate (object o, RowActivatedArgs args) {
TreeIter iter;
if (store.GetIter (out iter, args.Path)) {
Type type = (Type)store.GetValue (iter, 1);
Window window = (Window)Activator.CreateInstance (type);
window.WindowPosition = WindowPosition.Center;
window.DeleteEvent += delegate { window.Destroy (); };
window.Show ();
}
};
view.Model = store;
view.AppendColumn ("Module", new CellRendererText (), "text", 0);
sw.Add (view);
box.PackStart (sw, true, true, 0);
sw.ShowAll ();
Button button = new Button (Stock.Quit);
button.Clicked += delegate { Destroy (); Application.Quit (); };
box.PackStart (button, false, false, 0);
box.ShowAll ();
}
开发者ID:rubenv,项目名称:tripod,代码行数:32,代码来源:TestModuleRunner.cs
示例13: 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();
}
开发者ID:hpbaotho,项目名称:supos,代码行数:33,代码来源:ViewNameIcon.cs
示例14: 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);
}
开发者ID:codebutler,项目名称:meshwork,代码行数:35,代码来源:StatusLogPage.cs
示例15: 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 ();
}
开发者ID:bl8,项目名称:dbus-sharp-glib,代码行数:30,代码来源:TestThreads.cs
示例16: TreeViewDemo
public TreeViewDemo ()
{
DateTime start = DateTime.Now;
Application.Init ();
PopulateStore ();
Window win = new Window ("TreeView demo");
win.DeleteEvent += new DeleteEventHandler (DeleteCB);
win.SetDefaultSize (640,480);
ScrolledWindow sw = new ScrolledWindow ();
win.Add (sw);
TreeView tv = new TreeView (store);
tv.HeadersVisible = true;
tv.EnableSearch = false;
tv.AppendColumn ("Name", new CellRendererText (), "text", 0);
tv.AppendColumn ("Type", new CellRendererText (), "text", 1);
sw.Add (tv);
dialog.Destroy ();
dialog = null;
win.ShowAll ();
Console.WriteLine (count + " nodes added.");
Console.WriteLine ("Startup time: " + DateTime.Now.Subtract (start));
Application.Run ();
}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:33,代码来源:TreeViewDemo.cs
示例17: Main9
public static int Main9 (string[] args)
{
Gtk.Application.Init ();
Window win = new Window ("Custom Widget Test");
win.DeleteEvent += new DeleteEventHandler (OnQuit);
VPaned paned = new VPaned ();
CustomWidget cw = new CustomWidget ();
cw.Label = "This one contains a button";
Button button = new Button ("Ordinary button");
cw.Add (button);
paned.Pack1 (cw, true, false);
cw = new CustomWidget ();
cw.Label = "And this one a TextView";
cw.StockId = Stock.JustifyLeft;
ScrolledWindow sw = new ScrolledWindow (null, null);
sw.ShadowType = ShadowType.In;
sw.HscrollbarPolicy = PolicyType.Automatic;
sw.VscrollbarPolicy = PolicyType.Automatic;
TextView textView = new TextView ();
sw.Add (textView);
cw.Add (sw);
paned.Pack2 (cw, true, false);
win.Add (paned);
win.ShowAll ();
Gtk.Application.Run ();
return 0;
}
开发者ID:akrisiun,项目名称:gtk-sharp,代码行数:30,代码来源:CustomWidget.cs
示例18: windowTerminalGTK
public windowTerminalGTK(clsHost host)
: base(String.Format("{0} - {1}:{2}",host.Name,host.RemoteHost,host.RemoteSSHPort))
{
SSH = new clsSSHTerminal(host);
Host = host;
ScrolledWindow scrolledWindow = new ScrolledWindow();
textview1 = new TextView();
this.SetSizeRequest(800,600);
scrolledWindow.Add(textview1);
textview1.ModifyFont(FontDescription.FromString(host.TerminalFont));
this.Add(scrolledWindow);
this.CanFocus = true;
ShowAll ();
SSH.TerminalData += (string text) =>
{
Gtk.Application.Invoke (delegate {
TextIter mIter = textview1.Buffer.EndIter;
textview1.Buffer.Insert(ref mIter, text);
textview1.ScrollToIter(textview1.Buffer.EndIter, 0, false, 0, 0);
});
};
}
开发者ID:Clancey,项目名称:SSHDebugger,代码行数:29,代码来源:windowTerminalGTK.cs
示例19: MainWindow
public MainWindow()
: base(Gtk.WindowType.Toplevel)
{
var webView = new WebKit.WebView();
var scrolled = new ScrolledWindow();
var v = new VPaned();
scrolled.Add(webView);
v.Pack1(scrolled, true, true);
scrolled.SetSizeRequest(-1, 50);
var button = new Button("foo");
v.Pack2(button, true, true);
this.Add(v);
this.ShowAll();
webView.LoadString("<p>foo</p>", "text/html", "utf-8", null);
// This won't show up until we've returned from the constructor
// so let's do something easy that can happen after the window shows
button.Clicked += (object sender, EventArgs e) => {
var document = webView.DomDocument;
var first = document.FirstChild;
var body = document.GetElementsByTagName("body").Item(0);
var para = document.CreateElement("p");
para.AppendChild(document.CreateTextNode("this is some text"));
body.AppendChild(para);
};
}
开发者ID:carlosmn,项目名称:webkit-dom,代码行数:30,代码来源:MainWindow.cs
示例20: 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
注:本文中的Gtk.ScrolledWindow类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论