aewarnick Posted March 5, 2003 Posted March 5, 2003 I have this test to see which control the contex menu pops up for but the problem is that it works for labels but not for Rich text boxes. In other words, when I right click on a text box no control is displayed in the messagebox but for labels it does. private void contextMenu1_Popup(object sender, System.EventArgs e) { MessageBox.Show(""+this.contextMenu1.SourceControl); } Is that normal? I have in VSC# the Context menu section set to the same context menu for both. Quote C#
aewarnick Posted March 18, 2003 Author Posted March 18, 2003 (edited) Please answer this, I am having much trouble figuring out why it works for labels and not for the text boxes. Also, you might want to know that when I do right click on a label the messagebox shows it is a label with the text property and when I right click on a textbox after that there is something in the messageBox but it is the label info. However, this method works: this.RTB1.Copy(); What did I do wrong? Edited March 18, 2003 by aewarnick Quote C#
aewarnick Posted March 19, 2003 Author Posted March 19, 2003 I got the context menu to work for rtb's but it still does not show any source control here: private void contextMenu1_Popup(object sender, System.EventArgs e) { MessageBox.Show(""+this.contextMenu1.SourceControl); } Does anyone know why? Quote C#
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.