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

Won't pick up styles at all...

8 Answers 52 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Rex
Top achievements
Rank 1
Rex asked on 22 Oct 2012, 05:48 AM
Please disregard my thread below. I converted all my <images> to <asp:images> and put them into the controls collection to get what I needed. Lots of work but a better result.

Anyway, I'm attaching a project that won't pick up my customized styles if I set them at runtime. If I set them at design time they get picked up and work just fine.

When I dynamically add 10 images and set them each with one of 4 custom styles it has a clear tooltip with transparent everything except text. 

Thanks in advance!

8 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 22 Oct 2012, 11:16 AM
Hi Rex,

I am glad to hear you have managed to get things working. I would only like to add a few clarifications on the use of the forums:

They are primarily community content and usually several code snippets and/or screenshots suffice to explain the issue one has. In case you would need us to review a more complex project you can open a support ticket and send an archive, because the support communication in the ticket is private to make sure any sensitive information does not leak.

In case you want your post to be publicli visible you can use a number of site that offer code upload, hosting or at least visual numbering. You would only need to make sure that if you upload content to a third party site it will not contain any of your own sensitive data/code and will not violate our licensing (i.e. it must not contain the Telerik assemblies).


All the best,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Rex
Top achievements
Rank 1
answered on 22 Oct 2012, 03:03 PM
This won't pick up the styles I have set in the parameters but they work fine if I set them at design time. I have a feeling I'm not passing the correct path or something else...

Sorry for being so cranky. It was late and I was tired and not feeling the best. I'm much better now. My sincere apologies for being a jerk.
Image _newImage = new Image(); 
Image _AtRiskImage = new Image(); 
string _imageStyle = ""
    
RadToolTip _radToolTip = new RadToolTip {RelativeTo = ToolTipRelativeDisplay.Mouse 
, Width = Unit.Pixel(500) 
, Height = Unit.Pixel(300) 
, IgnoreAltAttribute = true
, EnableEmbeddedBaseStylesheet = true
, EnableEmbeddedSkins = false
, EnableShadow = false
, IsClientID = true
, ShowEvent = ToolTipShowEvent.OnMouseOver 
, ClientIDMode = ClientIDMode.AutoID 
, VisibleOnPageLoad = false
, Title = "Title"}; 
    
if (pReleaseType == "Interim"
_radToolTip.Skin = _classToolTipInterim; 
_radToolTip.Text = pProductName + ":" + pReleaseType + ":" + pVersionNumber + ":" + pAtRisk; 
    
_newImage.ImageUrl = "Images/Purple.png"
_newImage.Style["style"] = "z-index: 100; position: absolute; left: " + _releaseLeft + "px; top: " + _imageTop.ToString(CultureInfo.InvariantCulture) + "px;"
else if (pReleaseType == "Fleet"
_radToolTip.Skin = _classToolTipFleet; 
_radToolTip.Text = pProductName + ":" + pReleaseType + ":" + pVersionNumber + ":" + pAtRisk; 
    
_newImage.ImageUrl = "Images/Green.png"
_newImage.Style["style"] = "z-index: 100; position: absolute; left: " + _releaseLeft + "px; top: " + _imageTop.ToString(CultureInfo.InvariantCulture) + "px;"
}
0
Marin Bratanov
Telerik team
answered on 23 Oct 2012, 08:45 AM
Hi Rex,

I am attaching here a simple page that works fine with me - the image gets the styles defined in the code-behind and I also show how HTML text can be added to the tooltip and how to properly attach the tooltip to the image. I hope my comments in the code will be helpful.


Greetings,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Rex
Top achievements
Rank 1
answered on 23 Oct 2012, 03:53 PM
I either have too new a WebUI.DLL or something because I have no:

EnableEmbeddedBaseStyleSheet 

Property to set. It's just not there.
0
Rex
Top achievements
Rank 1
answered on 23 Oct 2012, 10:15 PM
I fixed the missing property above my upgrading to Q3. I still cannot get my styles to work or I'm just not seeing your solution. 

I followed this: http://www.telerik.com/help/aspnet-ajax/tooltip-appearance-creating-custom-skin.html to create 4 different styles:

    
<link rel="stylesheet" type="text/css" href="Resources/ToolTipOverRideGreen/ToolTip.ToolTipOverRideGreen.css"/>
<link rel="stylesheet" type="text/css" href="Resources/ToolTipOverRideOrange/ToolTip.ToolTipOverRideOrange.css"/>
<link rel="stylesheet" type="text/css" href="Resources/ToolTipOverRidePurple/ToolTip.ToolTipOverRidePurple.css"/>
<link rel="stylesheet" type="text/css" href="Resources/ToolTipOverRideTurquoise/ToolTip.ToolTipOverRideTurquoise.css"/>

The tooltips are all created with a transparent background (no style at all, no close button, nothing) but they have the right title and text.
0
Accepted
Marin Bratanov
Telerik team
answered on 24 Oct 2012, 11:58 AM
Hello Rex,

The EnableEmbeddedBaseStyleSheet property is available in all skinnable RadControls and has neither been added, nor removed in recent versions. It configures whether the control will output is basic stylesheet, i.e. the one that is not skin-specific: http://www.telerik.com/help/aspnet-ajax/introduction-how-skins-work.html.

On the subject of styles - if I have undersood you correctly your problem was that the images did not get the expected styles, and I showed in my sample how to do this.

Regarding the new skinning issue with the tooltips - the custom skin tutorial you linked also explains how the skin name of the control is constructed - it must not contain the .css extension at the end (see point 7):
private const string _classToolTipFleet = "ToolTipOverRide";
private const string _classToolTipInterim = "ToolTipOverRidePurple";
private const string _classToolTipNPI = "ToolTipOverRideTurquoise";
private const string _classToolTipPRV = "ToolTipOverRideOrange";

I am attaching here a flash video that shows the behavior on my end once I fixed this.

Greetings,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Rex
Top achievements
Rank 1
answered on 24 Oct 2012, 02:56 PM
I am sorry I have been kind of cranky. I have a badly herniated disc and I'm in no small amount of pain. So forgive me for my little outbursts. Pain has a way of making me irritable. 
0
Marin Bratanov
Telerik team
answered on 25 Oct 2012, 03:27 PM
Hello Rex,

I am sorry to hear about your illness. I hope you will get better quickly!


All the best,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ToolTip
Asked by
Rex
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Rex
Top achievements
Rank 1
Share this question
or