Re: extent of unwrapped text in a button
- To: mathgroup at smc.vnet.net
- Subject: [mg103188] Re: extent of unwrapped text in a button
- From: Harutyun Amirjanyan <amirjanyan at gmail.com>
- Date: Thu, 10 Sep 2009 07:19:37 -0400 (EDT)
- References: <h859n5$pp9$1@smc.vnet.net>
some-why ImageSize -> {Full, Full} doesn't work as expected (I thought it should be same as ImageSize -> Full) Grid[{{Button["xxx", ImageSize -> All]}, {Button["xxx", ImageSize -> Automatic]}, {Button["xxx", ImageSize -> Full]}, {Button["xxx", ImageSize -> {Full, Full}]}, {"zzzzzzzzzzzzzzzzzzzzzzzz"}}, Dividers -> All] this seems to do what you wanted currentlyOpenNotebooks[] := Module[{allNotebooks = Notebooks[], names, buttons, notebookData}, names = CurrentValue[#, "NotebookFileName"] & /@ allNotebooks; notebookData = Sort@Transpose[{names, allNotebooks}]; buttons = Column[Button[Style[#[[1]], 10, Bold, Darker@Blue], SetSelectedNotebook[#[[2]]], Appearance -> "Palette", Alignment -> Left, ImageSize -> Full] & /@ notebookData]; CreateWindow@PaletteNotebook[buttons (*,CellMargins->{{0,0},{0,0}}*), WindowTitle -> "Current Notebooks", WindowSize -> All, WindowElements -> "VerticalScrollBar"]]; currentlyOpenNotebooks[]