Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
510
Highlight Selected Item In UltraExplorerbar at Runtime
posted

Is there an easy way to highlight the selected item on UltraExplorerBar at runtime? I need to be able to highlight an item when the user selects it.

Parents
No Data
Reply
  • 510
    Verified Answer
    posted

    I found a solution to the problem:

    //variable Declarations
    private Infragistics.Win.Appearance selectedItemAppearance;
    private UltraExplorerBarItem lastSelectedItem;

    //Inside class constructor
    this.selectedItemAppearance  = new Infragistics.Win.Appearance();
    this.lastSelectedItem = null;
    this.selectedItemAppearance.BackColor = SystemColors.MenuHighlight;

    this.selectedItemAppearance.ForeColor = SystemColors.HighlightText;

    //Event handler
    this.ultraExplorerBar1.ItemClick += new ItemClickEventHandler(ultraExplorerBar1_ItemClick);


    private void ultraExplorerBar1_ItemClick(object sender, ItemEventArgs e)
    {
        if ( this.lastSelectedItem != null )
            this.lastSelectedItem.Settings.AppearancesSmall.Appearance = null;
        this.lastSelectedItem = e.Item;
        e.Item.Settings.AppearancesSmall.Appearance = this.selectedItemAppearance;
    }

     

     

     

Children
No Data