![View this Page](/schemes/poor/viewie.gif)
![Edit this Page](/schemes/poor/edit.gif)
![Attachments to this Page](/schemes/poor/upload.gif)
![History of this Page](/schemes/poor/history.gif)
![Home](/schemes/poor/top.gif)
![Recent Changes](/schemes/poor/recent.gif)
![Search the Swiki](/schemes/poor/search.gif)
Menu
| m |
m := CustomMenu
labels: 'again\undo\copy\cut\paste\format\accept\cancel\compose' withCRs
lines: #(2 5 6 8)
selections: #(again undo copySelection cut paste format accept cancel compose).
m startUp.
----------------------------------------------------------
| menu |
menu := CustomMenu new.
menu add: 'apples' action: #apples.
menu add: 'oranges' action: #oranges.
menu addLine.
menu addLine. "extra lines ignored"
menu add: 'peaches' action: #peaches.
^ menu startUp
----------------------------------------------------------
The following is equivalent to the above, but uses the compact #fromArray: construct:
(CustomMenu fromArray:
#(('apples' apples)
('oranges' oranges)
-
-
('peaches' peaches)
))
startUp: #apples
----------------------------------------------------------
(EmphasizedMenu
selections: #('how' 'well' 'does' 'this' 'work?')
emphases: #(bold plain italic struckOut plain))
startUpWithCaption: 'My Ephasized Menu'
----------------------------------------------------------
PopUpMenu notify: 'Vas disk bude vymazan.'
----------------------------------------------------------
FillInTheBlank
request: 'Vas oblibeny prog. jazyk?'
initialAnswer: 'Java'
Link to this Page
- FAQ last edited on 15 February 2006 at 11:28 am by libuse.fit.vutbr.cz