Voici un des exemples de code de la vidéo:
|aWindow aPanel buttonPanel| aWindow := SystemWindow labelled: 'My first window'. aPanel := PluggablePanelMorph new. aWindow addMorph: aPanel fullFrame: ( LayoutFrame fractions: (0@0 corner: 1@1) offsets: (0@0 corner: 0@50 negated)). aPanel color: (Color blue). buttonPanel := PluggablePanelMorph new. aWindow addMorph: buttonPanel fullFrame: ( LayoutFrame fractions: (0@0.99 corner: 1@1) offsets: (0@50 negated corner: 0@0)). buttonPanel color: (Color green). #(one two three) do: [:label| |aButton| aButton := PluggableButtonMorph new label: label; yourself. buttonPanel addMorph: aButton fullFrame: nil. ]. aWindow openInWorld.
No comments:
Post a Comment