Mercurial > projects > dynamin
comparison dynamin/gui/notebook.d @ 8:b621b528823d
whenXX methods have to come before the event if switched to template mixins.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Wed, 15 Jul 2009 14:04:55 -0500 |
parents | 4029d5af7542 |
children | 682fa50ab831 |
comparison
equal
deleted
inserted
replaced
7:1311fae1ca9b | 8:b621b528823d |
---|---|
97 else if(selectedIndex == -1) | 97 else if(selectedIndex == -1) |
98 selectedIndex = 0; | 98 selectedIndex = 0; |
99 layout(); | 99 layout(); |
100 } | 100 } |
101 public: | 101 public: |
102 /// Override this method in a subclass to handle the SelectionChanged event. | |
103 protected void whenSelectionChanged(EventArgs e) { | |
102 /// This event occurs after a different tab is selected. | 104 /// This event occurs after a different tab is selected. |
103 Event!() selectionChanged; | 105 Event!() selectionChanged; |
104 /// Override this method in a subclass to handle the SelectionChanged event. | |
105 protected void whenSelectionChanged(EventArgs e) { | |
106 if(_content !is null) | 106 if(_content !is null) |
107 _children.remove(_content); | 107 _children.remove(_content); |
108 _content = null; | 108 _content = null; |
109 if(_selectedIndex >= 0) { | 109 if(_selectedIndex >= 0) { |
110 _content = selectedTabPage.content; | 110 _content = selectedTabPage.content; |