Exactly that! Thanks, Laurent! Regards, Christian
On Mon, Apr 23, 2012 at 4:42 PM, laurent laffont <[email protected]>wrote: > > On Mon, Apr 23, 2012 at 8:01 PM, Christian Caldeiro < > [email protected]> wrote: > >> Hi, >> >> First of all, congratulations for the new 1.4 release. >> >> I’m not new to Smalltalk but I am to Pharo’s UI. All I did until now in >> Pharo was using it as server (Seaside). >> >> I saw some applications done with Pharo that show a menu bar at the very >> top of its main window (lets say, above Pharo’s logo). I’m wandering how to >> do that. All samples I saw (and correct me if I’m wrong) first create a new >> window (ie a StandardWindow) and then add the menubar and menu to it. >> >> Any sample I can look at? >> > > > Something like that ? > > |dock| > dock := DockingBarMorph new > adhereToTop; > openInWorld. > dock > addMorph: ( PluggableButtonMorph new > label: 'Hello'; > model: [UIManager inform: 'Hello Pharo !']; > actionSelector: #value); > addMorph: ( PluggableButtonMorph new > label: 'Close'; > model: [dock delete]; > actionSelector: #value); > addMorph: ( MenuItemMorph new > contents: 'A menu'; > subMenu: (MenuMorph new > add: 'Hello' target: [UIManager inform: 'Hello from menu'] action: #value; > add: 'Goodbye' target: [dock delete] action: #value; > yourself)). > > > > Laurent Laffont - @lolgzs <http://twitter.com/#%21/lolgzs> > > Blog: http://magaloma.blogspot.com/ > Developer group: http://www.cara74.org > Pharo Smalltalk Screencasts: http://www.pharocasts.com/ > Pharo web deployment: http://www.alpha.smallharbour.org > > > > > >> >> Thanks >> >> Christian >> >> >
