protected void OnButtonEllipsisClicked(string existingValue) { if (ButtonEllipsisClicked != null) { ButtonEllipsisClicked_EventArgs e = new ButtonEllipsisClicked_EventArgs(existingValue); ButtonEllipsisClicked(this, e); } }
private void txtTarget_ButtonEllipsisClicked(object sender, ButtonEllipsisClicked_EventArgs e) { // Bring up the browse window to get a folder fbdMain.SelectedPath = (txtTarget.EditValue != null && !String.IsNullOrEmpty(txtTarget.EditValue.ToString()) ? txtTarget.EditValue.ToString() : string.Empty); fbdMain.ShowNewFolderButton = false; fbdMain.Description = "Select Target Path"; if (fbdMain.ShowDialog() == DialogResult.OK) { if (!Directory.Exists(fbdMain.SelectedPath)) { MessageBox.Show("The path entered is not a valid path.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } txtTarget.EditValue = fbdMain.SelectedPath; } }