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

LoadOnDemand tooltip size?

4 Answers 114 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 22 Jun 2009, 12:43 PM
Hi,

I am loading a usercontrol into a tooltip as per the example on your site. This all works fine techincally, however, it seems that the tooltip can only be of ONE set size height + width. 

So for example, I have 2 linkbuttons at the top of the page. One link button opens a tooltip and displays a small list of radiobuttons. The other linkbutton however needs to display a treeview - therefore we have 2 very different sizes here.

As per the example, I have using tooltipmanager and the targetControls collection - it seems that instead of being able to specify different sizes for different target controls in the collection, I can only specify width and height properties for the tooltip manager itself - and this sucks when he have more than one tooltip/different size tooltips on the page.

Is there any workaround for this? Maybe a way to set height and width dynamically onajaxupdate? 

As a feature it would definately be better to be able to specify tooltip height and width for each targetcontrolid.

Thanks,
Matt

4 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 25 Jun 2009, 07:36 AM
Hello Matt Davis,

In the case you describe, the tooltips should automatically resize and there could be only a problem with the position - the tooltip might "jump" due to resizing itself. In case on your side the problem is with the size but not the position, please open a new support ticket and send me a sample demo along with some screenshots and I will investigate the issue further.

As to changing the size dynamically, you can do this on the client by using the OnClientBeforeShow event and the client - side set_width and set_height methods. If you set the size in the OnAjaxUpdate event, this will not make any difference because this event updates only the update panel which holds the content of the tooltip and not the manager itself.

This being said, please try the client solution and let us know how it goes.


Kind regards,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Adam Hubble
Top achievements
Rank 1
answered on 25 Jun 2009, 02:13 PM
Hi Svetlina, the tooltip does resize to fit the content, but not properly. The right border disappears and the manual close icon stays in the position it would be in if the tooltip used the width set in the radtooltipmanager. So for example the tooltipmanager has a width of 200px specified. However if the control being loaded is 400px wide, then the manual close icon will stay at the 200px position, the right border will disappear. Only the height of the tooltip scales correctly.

I will try the client method and get back to you if I have any problems. I'm not doing anything special here, I'm using the exact approach used in telerik's example (http://demos.telerik.com/aspnet-ajax/tooltip/examples/loadondemand/defaultcs.aspx), only I have usercontrols of different sizes - and I'm using a switch case OnAjaxUpdate to determine which args.TargetControlID is selected.

Thanks,
Matt

0
Accepted
Svetlina Anati
Telerik team
answered on 01 Jul 2009, 06:56 AM
Hi Matt,

I prepared a sample demo based on your explanations but unfortunately to no avail - everything worked as expected. The demo loads on demand a panel which changes its size dynamically and the manager automatically resizes the tooltip based on its content and the manual close button is correctly displayed. I tested the demo both with the 2009.1.402 version as you have noted and also with the latest build but the result was the same and the correct one.

I attached my test demo to this thread  for your reference. 


Sincerely yours,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Adam Hubble
Top achievements
Rank 1
answered on 01 Jul 2009, 08:06 AM
Hi Svetlina, this leads me to believe that the problem must be due to conflict between my CSS styles and radtooltip's generated styles.

Thanks for your help,
Matt
Tags
ToolTip
Asked by
Adam Hubble
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Adam Hubble
Top achievements
Rank 1
Share this question
or