using System; using System.Windows.Forms; using FastColoredTextBoxNS; namespace Tester { public partial class BookmarksSample : Form { public BookmarksSample() { InitializeComponent(); } private void btAddBookmark_Click(object sender, EventArgs e) { fctb.Bookmarks.Add(fctb.Selection.Start.iLine); } private void btRemoveBookmark_Click(object sender, EventArgs e) { fctb.Bookmarks.Remove(fctb.Selection.Start.iLine); } private void btGo_DropDownOpening(object sender, EventArgs e) { btGo.DropDownItems.Clear(); foreach (var bookmark in fctb.Bookmarks) { var item = btGo.DropDownItems.Add(bookmark.Name); item.Tag = bookmark; item.Click += (o, a) => ((Bookmark)(o as ToolStripItem).Tag).DoVisible(); } } } }
By viewing downloads associated with this article you agree to the Terms of use and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)
Skills that self-taught computer programmers lack