Hello,
is there a possibility to define a different tooltip on an each Editorbutton of an ultratexteditor?
regards
The ToolTip class works on the control level. So there's no way to apply a tooltip to part of a control. Typically, what you would do in a case like this is use the MouseMove event to change the tooltip on the control based on which button the mouse is over.
The tricky part is determining which button the mouse is over. But this is easy once you know how.
private void ultraTextEditor1_MouseMove(object sender, MouseEventArgs e) { UltraTextEditor ultraTextEditor = (UltraTextEditor)sender; UIElement element = ultraTextEditor.UIElement.LastElementEntered; if (element != null) { EditorButtonBase editorButton = element.GetContext(typeof(EditorButtonBase)) as EditorButtonBase; if (editorButton != null) { Debug.WriteLine(editorButton.Key); return; } } Debug.WriteLine("No editor button found"); }
thx, Mike.
Unfortunatly this does'nt work with Office2007-Style. I get
{Infragistics.Win.EditorWithTextDisplayTextUIElement} Infragistics.Win.UIElement {Infragistics.Win.EditorWithTextDisplayTextUIElement}
Ist there a workaround too?
forget this, was my mistake while testing. It works with Office2007-Style. All is fine !!
-------------------------------
I requested this feature more than one year ago. A property like this will be very comfortable:
this.MyTextbox.Editorbuttons[0].Tooltip = "MyTooltip";
Where is the problem for your guys?
Robert