             }
             trackingArea = NSTrackingArea(rect: self.bounds, options: NSTrackingAreaOptions.MouseEnteredAndExited | NSTrackingAreaOptions.ActiveAlways, owner: self, userInfo: nil)
             self.addTrackingArea(trackingArea)
-        }
-        
-        func setSelected(isIt: Bool) {
-            let color = isIt ? parentTabView.selectionColor : parentTabView.titleColor
-            self.attributedTitle = attributedString(color)
-            underline.hidden = !isIt
         }
         
         init(_ title: String, _ identifier: String?, tabView: KSTabView) {

    
    var leftButtonList = [KSButton]()
    var rightButtonList = [KSButton]()
    var currentButton: KSButton? {
        didSet {
            println("CurrentButton set")
            oldValue?.setSelected(false)
            currentButton?.setSelected(true)
        }
    }


        var trackingArea: NSTrackingArea!
        let parentTabView: KSTabView
        var underline = NSBox(frame: NSZeroRect)
        var selected = false {
            didSet {
                let color = self.selected ? parentTabView.selectionColor : parentTabView.titleColor
                self.attributedTitle = attributedString(color)
                underline.hidden = !self.selected
                
            }
        }
        
        func toggleSelection() {
            selected = !selected
        }

        override func updateTrackingAreas() {
            super.updateTrackingAreas()
