From 6d3c0cf744b596fe7d60174c1f1d05f4f073377c Mon Sep 17 00:00:00 2001 From: Drew Holzworth Date: Mon, 13 Jul 2020 13:04:02 +1000 Subject: [PATCH] Changed sample project to show line numbers in sourceview Just to make it a bit more obvious that the widget is a SourceView and not a TextView. --- Source/Samples/MainWindow.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Samples/MainWindow.cs b/Source/Samples/MainWindow.cs index 2518c7796..2689b4753 100644 --- a/Source/Samples/MainWindow.cs +++ b/Source/Samples/MainWindow.cs @@ -16,7 +16,7 @@ namespace Samples private Box _boxContent; private TreeStore _store; private Dictionary _items; - private TextView _textViewCode; + private SourceView _textViewCode; private Notebook _notebook; public MainWindow() : base(WindowType.Toplevel) @@ -56,7 +56,10 @@ namespace Samples _notebook.AppendPage(scroll1, new Label { Text = "Data", Expand = true }); var scroll2 = new ScrolledWindow(); + _textViewCode = new SourceView(); + _textViewCode.ShowLineNumbers = true; + _textViewCode.Margin = 3; scroll2.Child = _textViewCode; _notebook.AppendPage(scroll2, new Label { Text = "Code", Expand = true });