Hello,
I am trying to use the default tooltip controller on a LabelControl. I was basing my code on this article
LabelControl
When I tried the following
ToolTipController defController = ToolTipController.DefaultController;
defController.SetToolTip(lblControl1, "Test test");
I can’t see the tooltip for the lblControl1.
The ToolTipController property for lblControl1 in the designer is not set to anything, which should allow me to use the default static controller to control the tooltips for this control, correct?
Do I have to set something else in order for me to get the tooltip working?
Thanks,
peter
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Peter,
The ToolTipController.DefaultController was designed to provide a tool tip for the third-party controls. To provide a tool tip for our controls, please use the approach suggested in the Setting ToolTips for Developer Express Controls topic.
Thank you, Marina
Hello,
I also tried adding a ToolTipController to the form from the Toolbox, assigning it to the ToolTipController property of the control and calling SetToolTip() with passing the control and the tooltip string. Still no tooltip shows for that control.
Also, correct me if I am misunderstanding this but the article that you pointed me to still suggests that I should be able to use the Default controller for what I am trying to achieve:
"By default, tooltips for all Developer Express controls are handled by the DefaultToolTipController. You can place this component on the form at design time to access and customize tooltip appearance and behavior settings."
Thanks,
peter
Hello Peter,
"By default, tooltips for all Developer Express controls are handled by the DefaultToolTipController. You can place this component on the form at design time to access and customize tooltip appearance and behavior settings."
For editors you should use approach suggested in the SetToolTip not working on all controls thread. This resolves your issue.
We'll clarify the DefaultToolTipController help topic ASAP (Documentation: Clarify information about the DefaultToolTipController).
Thank you,
Marina
Hello,
I read the article that you pointed me to but I don't see any new or different information from what I have already tried. I am attaching a sample project in VS2005 with which I was able to reproduce the problem.
thanks,
Peter
Hi,
The SetToolTip method assigns a hint to a control, but doesn't display it. To display the hint, you need to use the ShowHint method:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevExpress.Utils; namespace WindowsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); ToolTipController defController = ToolTipController.DefaultController; defController.SetToolTip(labelControl1, "Test02"); } ToolTipController defController; private void Form1_Load(object sender, EventArgs e) { defController = ToolTipController.DefaultController; defController.SetToolTip(labelControl1, "Test03"); } private void labelControl1_MouseMove(object sender, MouseEventArgs e) { defController.ShowHint(defController.GetToolTip(labelControl1), labelControl1.PointToScreen(e.Location)); } } }
Thank you, Marina
Te suggestion you made resolved the issue. I wasn't aware that I have to explicitly make a call to show the hint - after I did that I was able to get the hint working.
Thanks,
peter
Issue resolved.