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

radtooltip in a composite control

1 Answer 49 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
SK
Top achievements
Rank 1
SK asked on 21 Sep 2012, 08:56 PM
I am trying to put RadToolTip in a composite control.. here is the code that I am trying to build....

public class OCToolTip : CompositeControl
    {
        private RadToolTip tip;
        private Image image;
 
        [Localizable(false)]
        protected override void CreateChildControls()
        {
            this.Controls.Clear();
 
            tip = new RadToolTip();
            image = new Image();
            image.CssClass = "helpImage";
            this.Controls.Add(image);
            this.Controls.Add(tip);
            tip.TargetControlID = image.ID;
            tip.IsClientID = true;
            tip.ShowEvent = ToolTipShowEvent.OnClick;
            tip.OnClientBeforeShow = "ShowToolTip";
        }
 
        protected override void Render(HtmlTextWriter writer)
        {
            AddAttributesToRender(writer);
            tip.RenderControl(writer);
        }
 
    }


It shows up the image but is not accepting the client click event. Any ideas what is wrong?

Thanks
SK

PS: I also tried to create a user control for RadToolTip but that did not work, the idea is that I need to use a help icon in various parts of my program and want to use radtooltip for that, is there an alternate solution?

1 Answer, 1 is accepted

Sort by
0
SK
Top achievements
Rank 1
answered on 24 Sep 2012, 07:59 PM
Never mind I made this a user control
Tags
ToolTip
Asked by
SK
Top achievements
Rank 1
Answers by
SK
Top achievements
Rank 1
Share this question
or