ScreenTip for a DropDownList

2 posts, 1 answers
  1. Christian
    Christian avatar
    81 posts
    Member since:
    Aug 2008

    Posted 01 Feb 2013 Link to this post


    How can I display the ScreenTip for a DropDownList?
    I would be grateful for a hint.
    With kind regards
    Christian Rudat
  2. Answer
    Plamen avatar
    132 posts

    Posted 06 Feb 2013 Link to this post

    Hi Christian,

    Thank you for writing.

    In order to show screentips for the items of the drop-down popup, you can subscribe to the ScreenTipNeeded event assign a screentip when it is needed and about to be shown:
    public Form1()
        this.radDropDownList1.DropDownListElement.Popup.ScreenTipNeeded += new Telerik.WinControls.ScreenTipNeededEventHandler(Popup_ScreenTipNeeded);
    void Popup_ScreenTipNeeded(object sender, Telerik.WinControls.ScreenTipNeededEventArgs e)
        RadOffice2007ScreenTipElement screenTip = new RadOffice2007ScreenTipElement();
        screenTip.CaptionLabel.Text = "Caption " + e.Item.Text;
        screenTip.MainTextLabel.Text = "MainText " + e.Item.Text;
        e.Item.ScreenTip = screenTip;

    As to the main part of RadDropDownList, it consist of several smaller parts (ArrowButtonDropDownListElement and TextBoxItem) that need to have screentips assigned to them:
    RadOffice2007ScreenTipElement arrowButtonScreenTip = new RadOffice2007ScreenTipElement();
    arrowButtonScreenTip.CaptionLabel.Text = "ArrowButton element";
    arrowButtonScreenTip.MainTextLabel.Text = "ScreenTip";
    this.radDropDownList1.DropDownListElement.ArrowButton.ScreenTip = arrowButtonScreenTip;
    RadOffice2007ScreenTipElement dropDownListElementScreenTip = new RadOffice2007ScreenTipElement();
    dropDownListElementScreenTip.CaptionLabel.Text = "DropDownListElement element";
    dropDownListElementScreenTip.MainTextLabel.Text = "ScreenTip";
    this.radDropDownList1.DropDownListElement.ScreenTip = dropDownListElementScreenTip;
    RadOffice2007ScreenTipElement editableElementScreenTip = new RadOffice2007ScreenTipElement();
    editableElementScreenTip.CaptionLabel.Text = "TextBoxItem element";
    editableElementScreenTip.MainTextLabel.Text = "ScreenTip";
    this.radDropDownList1.DropDownListElement.EditableElement.TextBox.TextBoxItem.ScreenTip = editableElementScreenTip;

    Find attached a sample project which demonstrates this functionality.

    I hope this helps.

    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top