From 705617566f4da41c2c87c6917fc22f2031a7bb64 Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 12 Aug 2013 19:30:05 +0000 Subject: [PATCH] Path Config - auto-complete for special commands --- BizHawk.MultiClient/config/NewPathConfig.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/BizHawk.MultiClient/config/NewPathConfig.cs b/BizHawk.MultiClient/config/NewPathConfig.cs index 662fdca803..930d9a8323 100644 --- a/BizHawk.MultiClient/config/NewPathConfig.cs +++ b/BizHawk.MultiClient/config/NewPathConfig.cs @@ -11,7 +11,21 @@ namespace BizHawk.MultiClient { public partial class NewPathConfig : Form { - public NewPathConfig() + private AutoCompleteStringCollection AutoCompleteOptions + { + get + { + return new AutoCompleteStringCollection() + { + "%recent%", + "%exe%", + ".\\", + "..\\", + }; + } + } + + public NewPathConfig() { InitializeComponent(); } @@ -119,7 +133,6 @@ namespace BizHawk.MultiClient int row_height = 30; foreach (var path in paths) { - TextBox box = new TextBox() { Text = path.Path, @@ -128,6 +141,9 @@ namespace BizHawk.MultiClient Name = path.Type, Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right, MinimumSize = new Size(26, 23), + AutoCompleteMode = AutoCompleteMode.SuggestAppend, + AutoCompleteCustomSource = AutoCompleteOptions, + AutoCompleteSource = AutoCompleteSource.CustomSource, }; Button btn = new Button()