jp2paint Posted April 23, 2015 Share Posted April 23, 2015 Is there a way to make the tool tip window go away once the Comb Box has been opened? A reusable method like sketched out below could handle each Combo Box's DropDown and DropDownClosed event: private ComboBox ComboBox1, ComboBox2, ComboBox3; private const String CBO1_TOOLTIP = "Shape type\nClick to open list\nShortcut keys: A (next shape), Shift+A (previous shape)"; private const String CBO2_TOOLTIP = "Text for ComboBox2"; private const String CBO3_TOOLTIP = "Text for ComboBox3"; private void InitializeComponent_Example() { // ComboBox1: ComboBox1.DropDown += new EventHandler(DropDown_Dropping); ComboBox1.DropDownClosed += new EventHandler(DropDown_Close); ComboBox1.Tag = CBO1_TOOLTIP; toolTip1.SetToolTip(ComboBox1, CBO1_TOOLTIP); // ComboBox2: ComboBox2.DropDown += new EventHandler(DropDown_Dropping); ComboBox2.DropDownClosed += new EventHandler(DropDown_Close); ComboBox2.Tag = CBO2_TOOLTIP; toolTip1.SetToolTip(ComboBox2, CBO2_TOOLTIP); // ComboBox3: ComboBox3.DropDown += new EventHandler(DropDown_Dropping); ComboBox3.DropDownClosed += new EventHandler(DropDown_Close); ComboBox3.Tag = CBO3_TOOLTIP; toolTip1.SetToolTip(ComboBox3, CBO3_TOOLTIP); } private void DropDown_Close(object sender, EventArgs e) { var ctrl = sender as ComboBox; if (ctrl != null) { toolTip1.SetToolTip(ctrl, String.Format("{0}", ctrl.Tag)); } } private void DropDown_Dropping(object sender, EventArgs e) { var ctrl = sender as ComboBox; if (ctrl != null) { toolTip1.SetToolTip(ctrl, null); } } If this is worth doing, my hope is that providing the code is helpful. I don't know if this is still a .NET project or what language it is currently in. Quote ~Joe Avoid Sears Home Improvement (click to read why) Link to comment Share on other sites More sharing options...
pdnnoob Posted April 23, 2015 Share Posted April 23, 2015 You could just move your mouse off the button. The tooltip goes away almost immediately. Quote No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo Link to comment Share on other sites More sharing options...
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.