View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

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