private void bInsertKeyword_Click( object sender, EventArgs e ) { if( keywordPicker == null ) keywordPicker = new KeywordPicker(); if( keywordPicker.ShowDialog() == DialogResult.OK ) { int selectionStart = tText.SelectionStart; tText.Paste( keywordPicker.Result ); tText.Select( selectionStart, keywordPicker.Result.Length ); tText.Focus(); } }
private void bInsertKeyword_Click(object sender, EventArgs e) { if (keywordPicker == null) { keywordPicker = new KeywordPicker(); } if (keywordPicker.ShowDialog() == DialogResult.OK) { int selectionStart = tText.SelectionStart; tText.Paste(keywordPicker.Result); tText.Select(selectionStart, keywordPicker.Result.Length); tText.Focus(); } }