This is a migrated thread and some comments may be shown as answers.

Strange width behaviour onshow

1 Answer 51 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Adam Hubble
Top achievements
Rank 1
Adam Hubble asked on 10 Jul 2009, 01:08 PM
Hello,

I'm loading user control(s) into my tooltips using AJAX. This is working ok, but when the user first clicks on the targetcontrol, the tooltip appears as a 10px high box with a full screen width. This happens in the loading phase (where a spinny should be shown) while the usercontrol is being loaded by ajax. When the user control loads, the tooltip suddenly changes to the right size (to fit the usercontrol content), but instead of being near to the target control, it positions itself at the far left of the screen.

I have noticed that if I specify exact width and height in tooltip manager, then the problem goes away - however, I cannot use these properties as I need the tooltip to grow/shrink to fit various different usercontrols with different height/width content.

Any ideas?
Matt

1 Answer, 1 is accepted

Sort by
0
Adam Hubble
Top achievements
Rank 1
answered on 10 Jul 2009, 01:39 PM
I have actually just found a workaround after posting.

One of my user controls has content which is about 300x600px, another has content which is about 300x300

I set width and height properties in the tooltipmanager to width = 300px and height = 600px.

I then used the onClientBeforeShow method like this:
{
var tooltip = telerik.web.ui.radtooltip.getcurrent();
tooltip.set_height(300);
}

The tooltip manager then seems to stretch out for the big control and also shrink down for the smaller control without any display errors.
Tags
ToolTip
Asked by
Adam Hubble
Top achievements
Rank 1
Answers by
Adam Hubble
Top achievements
Rank 1
Share this question
or