Exactly that! Thanks, Laurent! Regards, Christian On Mon, Apr 23, 2012 at 4:42 PM, laurent laffont <laurent.laffont@gmail.com>wrote:
On Mon, Apr 23, 2012 at 8:01 PM, Christian Caldeiro < christian.caldeiro@googlemail.com> 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