I am using the ScreenTip feature to show some extra info in my RadGridView row when mousing over. That is working great but the delay is a bit much before it pops up when you mouse over it. I noticed here that the regular ToolTip has lots of properties that can be set to adjust this:
http://www.telerik.com/community/forums/winforms/gridview/tooltip-visible-time.aspx
I am wondering if you can include some code with samples here on how to do the same thing with the ScreenTip. Changing the code from that sample around didn't seem to work.
Thanks in advance!
http://www.telerik.com/community/forums/winforms/gridview/tooltip-visible-time.aspx
I am wondering if you can include some code with samples here on how to do the same thing with the ScreenTip. Changing the code from that sample around didn't seem to work.
Thanks in advance!
4 Answers, 1 is accepted
0
Hi Adam,
Thank you for the question.
In order to change the delay, you need to change the value of the showDelay field. You should do this on the ScreenTipNeeded event. Please refer to the code snippet below for additional information:
I hope you find this answer helpful. If you have further questions, feel free to contact me.
Kind regards,
Nikolay
the Telerik team
Thank you for the question.
In order to change the delay, you need to change the value of the showDelay field. You should do this on the ScreenTipNeeded event. Please refer to the code snippet below for additional information:
RadOffice2007ScreenTipElement screenTip =
new
RadOffice2007ScreenTipElement();
private
void
radGridView1_ScreenTipNeeded(
object
sender, Telerik.WinControls.ScreenTipNeededEventArgs e)
{
GridDataCellElement cell = e.Item
as
GridDataCellElement;
if
(cell !=
null
)
{
ComponentBehavior behavior = (cell.ElementTree.ComponentTreeHandler
as
IComponentTreeHandler).Behavior;
PropertyInfo screenPresenterProperty =
typeof
(ComponentBehavior).GetProperty(
"ScreenPresenter"
, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetProperty);
object
screenTipPresenter = screenPresenterProperty.GetValue(behavior,
null
);
Type radScreenTipType = screenTipPresenter.GetType();
FieldInfo delayField = radScreenTipType.GetField(
"showDelay"
, BindingFlags.NonPublic | BindingFlags.Instance);
int
newDelayFieldValue = 1;
delayField.SetValue(screenTipPresenter, newDelayFieldValue);
cell.ScreenTip = screenTip;
screenTip.MainTextLabel.Text =
"SampleText"
;
}
}
I hope you find this answer helpful. If you have further questions, feel free to contact me.
Kind regards,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
stefano
Top achievements
Rank 1
answered on 08 Oct 2013, 03:36 PM
Hi,
since the post is very old (2010) I'd like to know if it is now possible to set the "delay" property directly using the new version 2013.2.612.40
Thank you for considering my request
since the post is very old (2010) I'd like to know if it is now possible to set the "delay" property directly using the new version 2013.2.612.40
Thank you for considering my request
0
Hi Stefano,
I hope this helps. Regards,
Nikolay
Telerik
In the latest versions we have exposed the Delay property at the ScreenTipNeededEventArgs and you can set it as shown below:
void
radGridView1_ScreenTipNeeded(
object
sender, Telerik.WinControls.ScreenTipNeededEventArgs e)
{
e.Delay = 1;
}
I hope this helps. Regards,
Nikolay
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
stefano
Top achievements
Rank 1
answered on 11 Oct 2013, 06:38 AM
Hi Nikolay,
that's solve thanks!
that's solve thanks!