hi
is there any easy to implement a mouse over hint on a combo box that will display what the full text of the combo box is. The actual dropdown hint can be much wider than the combo box to deal with extra long strings and need to be able to show on mouse over what is in the combo box.
any ideas or pointers gratefully accepted. Don't want to have implement a bespoke javascript/dhtml solution if I can help it
is there any easy to implement a mouse over hint on a combo box that will display what the full text of the combo box is. The actual dropdown hint can be much wider than the combo box to deal with extra long strings and need to be able to show on mouse over what is in the combo box.
any ideas or pointers gratefully accepted. Don't want to have implement a bespoke javascript/dhtml solution if I can help it
5 Answers, 1 is accepted
0
Hello Kieran,
You could add a tooltip on RadComboBox:
<telerik:RadComboBox ToolTipService.ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" ...>
The same will work in Silverlight too.
Greetings,
Valeri Hristov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You could add a tooltip on RadComboBox:
<telerik:RadComboBox ToolTipService.ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" ...>
The same will work in Silverlight too.
Greetings,
Valeri Hristov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kieran
Top achievements
Rank 1
answered on 02 Sep 2009, 08:46 PM
Hi
When I add that or any part of that I get told that the server tag is not well formed. Do you have a concrete example? what goes into the {".."}} part - the value of a field or is it a reference to the control?
thanks
When I add that or any part of that I get told that the server tag is not well formed. Do you have a concrete example? what goes into the {".."}} part - the value of a field or is it a reference to the control?
thanks
0
Hi Kieran,
The ... are the rest of the control properties that you would want to set, they are irrelevant to the sample, that's why I didn't include them. As for the "not well formed" error - the sample is for Silverlight 3/WPF, I guess you are pasting the snippet in a ASP.NET page, hence the error. If you place the XAML into a WPF application it should work if you have the right references.
Here is the full sample:
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
The ... are the rest of the control properties that you would want to set, they are irrelevant to the sample, that's why I didn't include them. As for the "not well formed" error - the sample is for Silverlight 3/WPF, I guess you are pasting the snippet in a ASP.NET page, hence the error. If you place the XAML into a WPF application it should work if you have the right references.
Here is the full sample:
<
Window x:Class="WpfApplication1.Window1" Title="Window1"
Height="600" Width="600"
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<StackPanel x:Name="LayoutRoot" Background="White">
<telerik:RadComboBox ToolTipService.ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}">
<telerik:RadComboBoxItem Content="item 1" />
<telerik:RadComboBoxItem Content="item 2" />
<telerik:RadComboBoxItem Content="item 3" />
</telerik:RadComboBox>
</StackPanel>
</Window>
Kind regards,
Valeri Hristov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kieran
Top achievements
Rank 1
answered on 03 Sep 2009, 01:46 PM
Hi
I am still confused - what does the "{Binding Text, RelativeSource={RelativeSource Self}}" refer to? Can't figure this put or get bit work with things I have tried
Kieran
I am still confused - what does the "{Binding Text, RelativeSource={RelativeSource Self}}" refer to? Can't figure this put or get bit work with things I have tried
Kieran
0
Hi Kieran,
This is a common WPF syntax for binding the values of properties - in this case the ToolTip attached property is bound to the Text property of RadComboBox - when the Text property changes, the ToolTip will also change. The RelativeSource part specifies the source of the binding, e.g. the object that contains the Text property, in this case Self means the element where the binding is applied to.
All the best,
Valeri Hristov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
This is a common WPF syntax for binding the values of properties - in this case the ToolTip attached property is bound to the Text property of RadComboBox - when the Text property changes, the ToolTip will also change. The RelativeSource part specifies the source of the binding, e.g. the object that contains the Text property, in this case Self means the element where the binding is applied to.
All the best,
Valeri Hristov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.