Beispiel #1
0
        private void USvgCombo_DrawItem(object sender, DrawItemEventArgs e)
        {
            uSvgComboItem selected = null;

            if (e.Index != -1)
            {
                selected = this.Items[e.Index] as uSvgComboItem;
                DrawSvg(selected.Path, e, selected.Name);
            }
            else
            {
                DrawSvg(null, e, "");
            }
        }
Beispiel #2
0
 public void SetSelectedByTag(string tag)
 {
     if (tag == null)
     {
         this.SelectedIndex = -1;
         return;
     }
     for (int n = 0; n < this.Items.Count; n++)
     {
         uSvgComboItem item = this.Items[n] as uSvgComboItem;
         if (item.Tag == tag)
         {
             this.SelectedIndex = n;
             return;
         }
     }
 }