Exemple #1
0
 public FlatToolBarButton( Control c, FlatToolBarPanel p )
 {
     style = FlatButtonType.Control;
     cb = c;
     state = FlatButtonState.Basic;
     parent = p;
     parent.parent.Controls.Add( cb );
     width = c.Width + 4;
     c.Height = 18;
 }
Exemple #2
0
 public FlatToolBarButton( FlatButtonType t, int index, MouseClickEvent e, string title, FlatToolBarPanel p )
 {
     style = t;
     this.title = title;
     ev = e;
     state = FlatButtonState.Basic;
     image_index = index;
     parent = p;
     switch( t ) {
         case FlatButtonType.Control:
             throw new ArgumentException( "wrong type: control" );
         case FlatButtonType.Line: width = FlatToolBarPanel.LineWidth; break;
         case FlatButtonType.Radio: case FlatButtonType.RadioDown: case FlatButtonType.Simple:
             width = 23;break;
     }
 }