[Pharo-project] [COTDC] 42 - ExpanderMorphContracted
Today: ExpanderMorphContracted Comment Of The Day Contest - One Day One Comment Rules: #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s). #2: If you cannot comment it, deprecate it. Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest Laurent
"I am an Announcement that occurs when an ExpanderMorph is contracted (rolled-up). Example where visibility of another UI component depends on the expanded/contracted state of Expander 2 |builder expanders ex1 ex2 text list row| builder := UITheme builder. expanders := builder newColumn: { ex1 := builder newExpander: 'Expander 1'. ex2 := builder newExpander: 'Expander 2'}. expanders width: 100; hResizing: #rigid. text := builder newTextEditorFor: (ValueHolder new contents: 'Some text') getText: #contents setText: #contents:. list := (builder newListFor: (ListModel new list: #('One' 'Two' 'Three' 'Four'); selectionIndex: 3) list: #list selected: #selectionIndex changeSelected: #selectionIndex: help: 'This is a list') minWidth: 120; visible: false; disableTableLayout: true. ex2 announcer when: ExpanderMorphContracted do: [list hide; disableTableLayout: true]; when: ExpanderMorphExpanded do: [list show; disableTableLayout: false]. row := builder newRow: { expanders. (builder newRow: {text. list}) vResizing: #spaceFill}. (row openInWindowLabeled: 'Expander Announcements Example') extent: 400@300 " Regards, Gary ----- Original Message ----- From: laurent laffont To: An open mailing list to discuss any topics related to an open-sourceSmalltalk Sent: Tuesday, April 05, 2011 7:32 PM Subject: [Pharo-project] [COTDC] 42 - ExpanderMorphContracted Today: ExpanderMorphContracted Comment Of The Day Contest - One Day One Comment Rules: #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s). #2: If you cannot comment it, deprecate it. Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest Laurent
Yeah coooool ! Laurent On Wed, Apr 6, 2011 at 10:46 AM, Gary Chambers <gazzaguru2@btinternet.com>wrote:
"I am an Announcement that occurs when an ExpanderMorph is contracted (rolled-up).
Example where visibility of another UI component depends on the expanded/contracted state of Expander 2
|builder expanders ex1 ex2 text list row| builder := UITheme builder. expanders := builder newColumn: { ex1 := builder newExpander: 'Expander 1'. ex2 := builder newExpander: 'Expander 2'}. expanders width: 100; hResizing: #rigid. text := builder newTextEditorFor: (ValueHolder new contents: 'Some text') getText: #contents setText: #contents:. list := (builder newListFor: (ListModel new list: #('One' 'Two' 'Three' 'Four'); selectionIndex: 3) list: #list selected: #selectionIndex changeSelected: #selectionIndex: help: 'This is a list') minWidth: 120; visible: false; disableTableLayout: true. ex2 announcer when: ExpanderMorphContracted do: [list hide; disableTableLayout: true]; when: ExpanderMorphExpanded do: [list show; disableTableLayout: false]. row := builder newRow: { expanders. (builder newRow: {text. list}) vResizing: #spaceFill}. (row openInWindowLabeled: 'Expander Announcements Example') extent: 400@300
"
Regards, Gary
----- Original Message ----- *From:* laurent laffont <laurent.laffont@gmail.com> *To:* An open mailing list to discuss any topics related to an open-sourceSmalltalk <pharo-project@lists.gforge.inria.fr> *Sent:* Tuesday, April 05, 2011 7:32 PM *Subject:* [Pharo-project] [COTDC] 42 - ExpanderMorphContracted
Today: ExpanderMorphContracted
Comment Of The Day Contest - One Day One Comment Rules: #1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s). #2: If you cannot comment it, deprecate it. Results: http://code.google.com/p/pharo/wiki/CommentOfTheDayContest
Laurent
participants (2)
-
Gary Chambers -
laurent laffont