Exemple #1
0
        private void treeList1_CustomDrawNodeButton(object sender, CustomDrawNodeButtonEventArgs e)
        {
            Brush backBrush = e.Cache.GetSolidBrush(Color.White);

            e.Graphics.FillRectangle(backBrush, e.Bounds);
            ControlPaint.DrawBorder(e.Graphics, e.Bounds, Color.Gray, ButtonBorderStyle.Solid);
            string       displayCharacter   = e.Expanded ? "-" : "+";
            StringFormat outCharacterFormat = new StringFormat();

            outCharacterFormat.Alignment     = StringAlignment.Center;
            outCharacterFormat.LineAlignment = StringAlignment.Center;
            e.Graphics.DrawString(displayCharacter, new Font("Tahoma", 11),
                                  new SolidBrush(Color.Black), e.Bounds, outCharacterFormat);
            e.Handled = true;
        }
Exemple #2
0
 private void treeClass_CustomDrawNodeButton(object sender, CustomDrawNodeButtonEventArgs e)
 {
 }