Hi,
I got aDocumentShell that has a toolbar and aShellView as sub-view, like in the following workspace code: a := DocumentShell show. t := a view addSubView: Toolbar new. a view backcolor: Color darkGray. c := a view addSubView: ShellView new. c position: 0@50. The shell view window lands on top of the toolbar when dragged there. Is there a way to have the toolbar always on top? Zoli Ontario, Canada |
Zoli,
> I got aDocumentShell that has a toolbar and aShellView as sub-view, > like in the following workspace code: > > a := DocumentShell show. > t := a view addSubView: Toolbar new. > a view backcolor: Color darkGray. > > c := a view addSubView: ShellView new. > c position: 0@50. > > The shell view window lands on top of the toolbar when dragged there. > Is there a way to have the toolbar always on top? I'm not sure of the exact cause of your problem. Here are a few random thoughts: It's a little unusual to embed a shell view inside another shell (though the view composer seems to do it well enough). Perhaps you are trying to make an MDI interface? If the latter, MS deprecated it (do as we say, not as we do<g>). You can open mulitple shells and still have commands that act across them; the Dolphin IDE is a good example. What are you using for a layout manager? Try BorderLayout, setting the #arrangement of the toolbar to #north and that of the embedded shell to #center. You can also use FramingLayout, which is a little more complicated but also more flexible. My Wizardry goodie has a few commands that position views as or on top of a row of buttons on the bottom a wizard card container, and might give you some ideas for how to use FramingLayout. If z-order is the issue, you might be able to detect repositioning of the shell and send #ensureVisible to the toolbar, or otherwise bring it to the top. Perhaps the best advice is to borrow from the VC, and put the embedded shell in a container view (or scroller) that would be able to clip it, and is itself arranged below the toolbar. See the VC's "arena". Have a good one, Bill -- Wilhelm K. Schwab, Ph.D. [hidden email] |
Thank you. I purchased Dolphin recently, and among other experiments,
did try out different view/subview pairs to get a MDI-like appearance. Wish I had something searchable for notes on all my Smalltalk experiments. It would be a great alternative to paper, since in the future I may forget or not think on everything. Thanks, Zoli Ontario, Canada |
Zoli,
> Thank you. I purchased Dolphin recently, and among other experiments, > did try out different view/subview pairs to get a MDI-like appearance. FWIW The ShellView class comment actually starts with "ShellView implements the <topView> protocol for top-level windows whose parent is the desktop" so it's behaviour will be undefined if you try and use it within another view. > Wish I had something searchable for notes on all my Smalltalk > experiments. It would be a great alternative to paper, since in the > future I may forget or not think on everything. <plug> You might like to have a look at DSDN then. </plug> It provides a single Dolphin browser that accesses - All class comments - All method comments - All package comments - The newsgroup archive files - The Dolphin education centre files - The WIKI files As well as browsing you can also search across all of the documents. The documents can also (optionally) be cached internally so searches, after the first, are reasonably fast. The relevance to your comment is that you can also copy any text or html file into an "Info" folder so it can be browsed and searched in the same way as the other documents. You can obtain DSDN from Bill's page at http://analgesic.anest.ufl.edu/anest4/bills/Smalltalk.htm NB: There is a slightly updated version in the pipeline that updates the WIKI bits (because of the recent move) -- Ian |
"Ian Bartholomew" <[hidden email]> wrote in message news:<D1kga.2185$[hidden email]>...
... > FWIW The ShellView class comment actually starts with > > "ShellView implements the <topView> protocol for top-level windows whose > parent is the desktop" > > so it's behaviour will be undefined if you try and use it within another > view. ... > <plug> You might like to have a look at DSDN then. </plug> ... ============== Ian: Good point that under the circumstances the shell view behaviour is undefined. Keeps things clear. DSDN is great. I'm using MS Word to write my notes and save'em as web page into the Info folder. Thanks, Zoli Ontario, Canada |
Free forum by Nabble | Edit this page |